|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.grizzly.samples.comet.iframechat.CometServlet.CometRequestHandler
public class CometServlet.CometRequestHandler
Field Summary | |
---|---|
String |
clientIP
|
Constructor Summary | |
---|---|
CometServlet.CometRequestHandler()
|
Method Summary | |
---|---|
void |
attach(PrintWriter printWriter)
Attach an intance of E to this class. |
void |
onEvent(CometEvent event)
Receive CometEvent notification. |
void |
onInitialize(CometEvent event)
Receive CometEvent notification when Grizzly is about to
suspend the connection. |
void |
onInterrupt(CometEvent event)
Receive CometEvent notification when the underlying
tcp communication is resumed by Grizzly. |
void |
onTerminate(CometEvent event)
Receive CometEvent notification when the response
is resumed by a CometHandler or by the CometContext |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public String clientIP
Constructor Detail |
---|
public CometServlet.CometRequestHandler()
Method Detail |
---|
public void attach(PrintWriter printWriter)
CometHandler
attach
in interface CometHandler<PrintWriter>
public void onEvent(CometEvent event) throws IOException
CometHandler
CometEvent
notification. This method will be invoked
everytime a CometContext.notify(java.lang.Object)
is invoked. The CometEvent
will contains the message that can be pushed back to the remote client,
cached or ignored. This method can also be used to resume a connection
once a notified by invoking CometContext.resumeCometHandler(com.sun.grizzly.comet.CometHandler)
.
onEvent
in interface CometHandler<PrintWriter>
IOException
public void onInitialize(CometEvent event) throws IOException
CometHandler
CometEvent
notification when Grizzly is about to
suspend the connection. This method is always invoked during the
processing of CometContext.addCometHandler(com.sun.grizzly.comet.CometHandler, boolean)
operations.
onInitialize
in interface CometHandler<PrintWriter>
IOException
public void onTerminate(CometEvent event) throws IOException
CometHandler
CometEvent
notification when the response
is resumed by a CometHandler
or by the CometContext
onTerminate
in interface CometHandler<PrintWriter>
IOException
public void onInterrupt(CometEvent event) throws IOException
CometHandler
CometEvent
notification when the underlying
tcp communication is resumed by Grizzly. This happens
when the CometContext.setExpirationDelay(long)
expires or when
the remote client close the connection.
onInterrupt
in interface CometHandler<PrintWriter>
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |