|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface CometHandler<E>
This interface allow Java components part of an HTTP request to be polled
by the Grizzly Asynchronous Request Mechanism. Components that implement
this interface will be notified when another CometHandler
notify them using CometContext.notify
.
With Servlet, it is recommended to attach the HTTPServletResponse
and use this object to push back bytes to the client.
Method Summary | |
---|---|
void |
attach(E attachment)
Attach an intance of E to this class. |
void |
onEvent(CometEvent event)
Receive CometEvent notification. |
void |
onInitialize(CometEvent event)
Receive CometEvent notification when the underlying
tcp communication is started by the client |
void |
onInterrupt(CometEvent event)
Receive CometEvent notification when the underlying
tcp communication is resumed by the Grizzly ARP. |
void |
onTerminate(CometEvent event)
Receive CometEvent notification when the underlying
tcp communication is closed by the CometHandler |
Method Detail |
---|
void attach(E attachment)
void onEvent(CometEvent event) throws IOException
CometEvent
notification.
IOException
void onInitialize(CometEvent event) throws IOException
CometEvent
notification when the underlying
tcp communication is started by the client
IOException
void onTerminate(CometEvent event) throws IOException
CometEvent
notification when the underlying
tcp communication is closed by the CometHandler
IOException
void onInterrupt(CometEvent event) throws IOException
CometEvent
notification when the underlying
tcp communication is resumed by the Grizzly ARP.
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |