com.sun.grizzly.cometd
Class DataHandler
java.lang.Object
com.sun.grizzly.cometd.DataHandler
- All Implemented Interfaces:
- CometHandler<Object[]>
public class DataHandler
- extends Object
- implements CometHandler<Object[]>
CometHandler used to support the meta channel Verb Connect and Reconnect.
The DataHandler is holding the state of the long polled (Comet) connection.
- Author:
- Jeanfrancois Arcand, TAKAI, Naoto
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DataHandler
public DataHandler(BayeuxParser bayeuxParser)
write
protected void write(String s,
CometdResponse res,
boolean flush)
throws IOException
- Throws:
IOException
attach
public void attach(Object[] reqRes)
- Specified by:
attach
in interface CometHandler<Object[]>
onEvent
public void onEvent(CometEvent event)
throws IOException
- Specified by:
onEvent
in interface CometHandler<Object[]>
- Throws:
IOException
onInitialize
public void onInitialize(CometEvent event)
throws IOException
- Specified by:
onInitialize
in interface CometHandler<Object[]>
- Throws:
IOException
onTerminate
public void onTerminate(CometEvent event)
throws IOException
- Specified by:
onTerminate
in interface CometHandler<Object[]>
- Throws:
IOException
onInterrupt
public void onInterrupt(CometEvent event)
throws IOException
- Specified by:
onInterrupt
in interface CometHandler<Object[]>
- Throws:
IOException
getChannels
public Collection<String> getChannels()
addChannel
public void addChannel(String channel)
containsChannel
public boolean containsChannel(String channel)
removeChannel
public boolean removeChannel(String channel)
isSuspended
public boolean isSuspended()
setSuspended
public void setSuspended(boolean isSuspended)
getRemotePort
public int getRemotePort()
Copyright © 2009 SUN Microsystems. All Rights Reserved.