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