com.sun.grizzly.cometd
Class DataHandler

java.lang.Object
  extended by com.sun.grizzly.cometd.DataHandler
All Implemented Interfaces:
CometHandler<java.lang.Object[]>

public class DataHandler
extends java.lang.Object
implements CometHandler<java.lang.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

Constructor Summary
DataHandler(BayeuxCometHandler bayeuxCometHandler)
           
 
Method Summary
 void addChannel(java.lang.String channel)
           
 void attach(java.lang.Object[] reqRes)
           
 java.util.Collection<java.lang.String> getChannels()
           
 java.lang.String getClientId()
           
 void onEvent(CometEvent event)
           
 void onInitialize(CometEvent event)
           
 void onInterrupt(CometEvent event)
           
 void onTerminate(CometEvent event)
           
 boolean removeChannel(java.lang.String channel)
           
 void setClientId(java.lang.String clientId)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DataHandler

public DataHandler(BayeuxCometHandler bayeuxCometHandler)
Method Detail

attach

public void attach(java.lang.Object[] reqRes)
Specified by:
attach in interface CometHandler<java.lang.Object[]>

onEvent

public void onEvent(CometEvent event)
             throws java.io.IOException
Specified by:
onEvent in interface CometHandler<java.lang.Object[]>
Throws:
java.io.IOException

onInitialize

public void onInitialize(CometEvent event)
                  throws java.io.IOException
Specified by:
onInitialize in interface CometHandler<java.lang.Object[]>
Throws:
java.io.IOException

onTerminate

public void onTerminate(CometEvent event)
                 throws java.io.IOException
Specified by:
onTerminate in interface CometHandler<java.lang.Object[]>
Throws:
java.io.IOException

onInterrupt

public void onInterrupt(CometEvent event)
                 throws java.io.IOException
Specified by:
onInterrupt in interface CometHandler<java.lang.Object[]>
Throws:
java.io.IOException

getChannels

public java.util.Collection<java.lang.String> getChannels()

addChannel

public void addChannel(java.lang.String channel)

removeChannel

public boolean removeChannel(java.lang.String channel)

getClientId

public java.lang.String getClientId()

setClientId

public void setClientId(java.lang.String clientId)


Copyright © 2005-2011 Oracle Corporation. All Rights Reserved.