com.sun.grizzly.container
Class GrizzletCometHandler

java.lang.Object
  extended by com.sun.grizzly.container.GrizzletCometHandler
All Implemented Interfaces:
CometHandler<GrizzletRequest>

public class GrizzletCometHandler
extends Object
implements CometHandler<GrizzletRequest>

Grizzlet implementation of Grizzly CometHandler.

Author:
Jeanfrancois Arcand,

Constructor Summary
GrizzletCometHandler()
           
 
Method Summary
 void attach(GrizzletRequest req)
          Attach the GrizzletRequest which is the connection that will be paused/parked.
 Grizzlet getGrizzlet()
          Return the associated Grizzlet.
 void onEvent(CometEvent event)
          Invoke the Grizzlet.onPush method in reaction to a CometComet.notify() operations.
 void onInitialize(CometEvent event)
          Receive CometEvent notification when the underlying tcp communication is started by the client
 void onInterrupt(CometEvent event)
          When the CometContext times out, this method will be invoked and the associated Grizzlet invoked.
 void onTerminate(CometEvent event)
          Invoked when the Grizzly resume the continuation.
 void setGrizzlet(Grizzlet grizzlet)
          Set the Grizzlet.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GrizzletCometHandler

public GrizzletCometHandler()
Method Detail

attach

public void attach(GrizzletRequest req)
Attach the GrizzletRequest which is the connection that will be paused/parked.

Specified by:
attach in interface CometHandler<GrizzletRequest>

onEvent

public void onEvent(CometEvent event)
             throws IOException
Invoke the Grizzlet.onPush method in reaction to a CometComet.notify() operations.

Specified by:
onEvent in interface CometHandler<GrizzletRequest>
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<GrizzletRequest>
Throws:
IOException

onInterrupt

public void onInterrupt(CometEvent event)
                 throws IOException
When the CometContext times out, this method will be invoked and the associated Grizzlet invoked.

Specified by:
onInterrupt in interface CometHandler<GrizzletRequest>
Throws:
IOException

onTerminate

public void onTerminate(CometEvent event)
                 throws IOException
Invoked when the Grizzly resume the continuation.

Specified by:
onTerminate in interface CometHandler<GrizzletRequest>
Throws:
IOException

getGrizzlet

public Grizzlet getGrizzlet()
Return the associated Grizzlet.


setGrizzlet

public void setGrizzlet(Grizzlet grizzlet)
Set the Grizzlet.



Copyright © 2010 SUN Microsystems. All Rights Reserved.