View Javadoc

1   
2   package org.eclipse.jetty.continuation;
3   
4   import java.util.EventListener;
5   
6   import javax.servlet.ServletRequestListener;
7   
8   
9   
10  /* ------------------------------------------------------------ */
11  /** A Continuation Listener
12   * <p>
13   * A ContinuationListener may be registered with a call to
14   * {@link Continuation#addContinuationListener(ContinuationListener)}.
15   * 
16   */
17  public interface ContinuationListener extends EventListener 
18  {    
19      /* ------------------------------------------------------------ */
20      /**
21       * Called when a continuation life cycle is complete and after
22       * any calls to {@link ServletRequestListener#requestDestroyed(javax.servlet.ServletRequestEvent)}
23       * The response may still be written to during the call.
24       * 
25       * @param continuation
26       */
27      public void onComplete(Continuation continuation);
28      
29      /* ------------------------------------------------------------ */
30      /**
31       * Called when a suspended continuation has timed out.
32       * The response may be written to and the methods 
33       * {@link Continuation#resume()} or {@link Continuation#complete()} 
34       * may be called by a onTimeout implementation,
35       * @param continuation
36       */
37      public void onTimeout(Continuation continuation);
38  }