com.sun.grizzly.cometd
Class BayeuxCometHandler
java.lang.Object
com.sun.grizzly.cometd.BayeuxCometHandlerBase
com.sun.grizzly.cometd.BayeuxCometHandler
- All Implemented Interfaces:
- CometHandler, CometdHandler
public class BayeuxCometHandler
- extends BayeuxCometHandlerBase
This class implement the Bayeux Server side protocol.
- Author:
- Jeanfrancois Arcand, TAKAI, Naoto
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DEFAULT_CONTENT_TYPE
public static final String DEFAULT_CONTENT_TYPE
- See Also:
- Constant Field Values
BAYEUX_COMET_HANDLER
public static final String BAYEUX_COMET_HANDLER
- See Also:
- Constant Field Values
BayeuxCometHandler
public BayeuxCometHandler()
onHandshake
public void onHandshake(CometEvent event)
throws IOException
- Throws:
IOException
onConnect
public void onConnect(CometEvent event)
throws IOException
- Throws:
IOException
onDisconnect
public void onDisconnect(CometEvent event)
throws IOException
- Throws:
IOException
removeActiveHandler
public boolean removeActiveHandler(String clientId,
CometContext ctx)
throws IOException
- Remove an
DataHandler from the list of active listener.
- Parameters:
clientId - ctx -
- Returns:
- Return true if the clientId was a registered
DataHandler
- Throws:
IOException
onReconnect
public void onReconnect(CometEvent event)
throws IOException
- Throws:
IOException
onSubscribe
public void onSubscribe(CometEvent event)
throws IOException
- Throws:
IOException
onUnsubscribe
public void onUnsubscribe(CometEvent event)
throws IOException
- Throws:
IOException
onPublish
public void onPublish(CometEvent event)
throws IOException
- Throws:
IOException
newCometdContext
public static final CometdContext newCometdContext(CometdRequest req,
CometdResponse res,
Verb verb)
onTerminate
public void onTerminate(CometEvent event)
throws IOException
- Description copied from interface:
CometHandler
- Receive
CometEvent notification when the response
is resumed by a CometHandler or by the CometContext
- Specified by:
onTerminate in interface CometHandler- Overrides:
onTerminate in class BayeuxCometHandlerBase
- Throws:
IOException
onInterrupt
public void onInterrupt(CometEvent event)
throws IOException
- Description copied from interface:
CometHandler
- Receive
CometEvent 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.
- Specified by:
onInterrupt in interface CometHandler- Overrides:
onInterrupt in class BayeuxCometHandlerBase
- Throws:
IOException
onPing
public void onPing(CometEvent event)
throws IOException
- Throws:
IOException
onStatus
public void onStatus(CometEvent event)
throws IOException
- Throws:
IOException
getChannels
public Collection<String> getChannels()
addChannel
public void addChannel(String channel)
removeChannel
public boolean removeChannel(String channel)
Copyright © 2005-2015 Oracle Corporation. All Rights Reserved.