com.sun.grizzly.cometd
Class DataHandler

java.lang.Object
  extended by 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

Constructor Summary
DataHandler()
           
 
Method Summary
 void attach(Object[] reqRes)
          Attach an intance of E to this class.
 String getChannel()
           
 String getClientId()
           
 void onEvent(CometEvent event)
          Receive CometEvent notification.
 void onInitialize(CometEvent event)
          Receive CometEvent notification when the underlying tcp communication is started by the client
 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 underlying tcp communication is closed by the CometHandler
 void setChannel(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

DataHandler

public DataHandler()
Method Detail

attach

public void attach(Object[] reqRes)
Description copied from interface: CometHandler
Attach an intance of E to this class.

Specified by:
attach in interface CometHandler<Object[]>

onEvent

public void onEvent(CometEvent event)
             throws IOException
Description copied from interface: CometHandler
Receive CometEvent notification.

Specified by:
onEvent in interface CometHandler<Object[]>
Throws:
IOException

onInitialize

public void onInitialize(CometEvent event)
                  throws IOException
Description copied from interface: CometHandler
Receive CometEvent notification when the underlying tcp communication is started by the client

Specified by:
onInitialize in interface CometHandler<Object[]>
Throws:
IOException

onTerminate

public void onTerminate(CometEvent event)
                 throws IOException
Description copied from interface: CometHandler
Receive CometEvent notification when the underlying tcp communication is closed by the CometHandler

Specified by:
onTerminate in interface CometHandler<Object[]>
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.

Specified by:
onInterrupt in interface CometHandler<Object[]>
Throws:
IOException

getChannel

public String getChannel()

setChannel

public void setChannel(String channel)

getClientId

public String getClientId()

setClientId

public void setClientId(String clientId)


Copyright © 2009 SUN Microsystems. All Rights Reserved.