CometContext#addCometHandler(CometHandler) automatically tells Grizzly Comet to suspend the underlying
connection and to avoid committing the response. Since the response is not committed, the connection is considered as
suspended and can be resumed later when an event happens by invoking
CometContext#resumeCometHandler(CometHandler), from CometHandler#onEvent.
CometContext#resumeCometHandler(CometHandler), resume the connection by committing the response. As an
example, a browser icons will spins when a connection is suspended, as the complete response hasn't been sent back.
Components that implement this interface will be notified org.
is invoked or when the CometContext#getExpirationDelay() expires.
| Modifier and Type | Method and Description |
|---|---|
| public CometContext | |
| public Response | |
| public void | |
| public void | onInitialize(CometEvent<E> event)
Receive |
| public void | onInterrupt(CometEvent<E> event)
Receive |
| public void | onTerminate(CometEvent<E> event)
Receive |
| public void | |
| public void |
| getCometContext | back to summary |
|---|---|
| public CometContext | |
| getResponse | back to summary |
|---|---|
public Response getResponse()
| |
| onEvent | back to summary |
|---|---|
| public void onEvent(CometEvent<E> event) throws IOException Receive | |
| onInitialize | back to summary |
|---|---|
| public void onInitialize(CometEvent<E> event) throws IOException Receive | |
| onInterrupt | back to summary |
|---|---|
| public void onInterrupt(CometEvent<E> event) throws IOException Receive | |
| onTerminate | back to summary |
|---|---|
| public void onTerminate(CometEvent<E> event) throws IOException Receive | |
| setCometContext | back to summary |
|---|---|
| public void setCometContext(CometContext<E> context) | |
| setResponse | back to summary |
|---|---|
| public void setResponse(Response response) | |