|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.grizzly.cometd.DataHandler
public class DataHandler
CometHandler used to support the meta channel Verb Connect and Reconnect. The DataHandler is holding the state of the long polled (Comet) connection.
| Constructor Summary | |
|---|---|
DataHandler(BayeuxCometHandler bayeuxCometHandler)
|
|
| Method Summary | |
|---|---|
void |
addChannel(String channel)
|
void |
attach(Object[] reqRes)
Attach an intance of E to this class. |
Collection<String> |
getChannels()
|
String |
getClientId()
|
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 the Grizzly ARP. |
void |
onTerminate(CometEvent event)
Receive CometEvent notification when the response
is resumed by a CometHandler or by the CometContext |
boolean |
removeChannel(String channel)
|
void |
setClientId(String clientId)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DataHandler(BayeuxCometHandler bayeuxCometHandler)
| Method Detail |
|---|
public void attach(Object[] reqRes)
CometHandler
attach in interface CometHandler<Object[]>
public void onEvent(CometEvent event)
throws IOException
CometHandlerCometEvent notification. This method will be invoked
everytime a CometContext.notify(E) 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.enterprise.web.connector.grizzly.comet.CometHandler).
onEvent in interface CometHandler<Object[]>IOException
public void onInitialize(CometEvent event)
throws IOException
CometHandlerCometEvent notification when Grizzly is about to
suspend the connection. This method is always invoked during the
processing of CometContext.addCometHandler(com.sun.enterprise.web.connector.grizzly.comet.CometHandler, boolean) operations.
onInitialize in interface CometHandler<Object[]>IOException
public void onTerminate(CometEvent event)
throws IOException
CometHandlerCometEvent notification when the response
is resumed by a CometHandler or by the CometContext
onTerminate in interface CometHandler<Object[]>IOException
public void onInterrupt(CometEvent event)
throws IOException
CometHandlerCometEvent notification when the underlying
tcp communication is resumed by the Grizzly ARP. This happens
when the CometContext.setExpirationDelay(long) expires or when
the remote client close the connection.
onInterrupt in interface CometHandler<Object[]>IOExceptionpublic Collection<String> getChannels()
public void addChannel(String channel)
public boolean removeChannel(String channel)
public String getClientId()
public void setClientId(String clientId)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||