com.nec.webotx.enterprise.web.connector.grizzly.comet
インタフェース CometHandler<E>


public interface CometHandler<E>

This interface allow Java components part of an HTTP request to be polled by the Grizzly Asynchronous Request Mechanism. Components that implement this interface will be notified when another CometHandler notify them using CometContext.notify.

With Servlet, it is recommended to attach the HTTPServletResponse and use this object to push back bytes to the client.


メソッドの概要
 void attach(E attachment)
          Attach an intance of E to this class.
 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
 

メソッドの詳細

attach

void attach(E attachment)
Attach an intance of E to this class.


onEvent

void onEvent(CometEvent event)
             throws java.io.IOException
Receive CometEvent notification.

例外:
java.io.IOException

onInitialize

void onInitialize(CometEvent event)
                  throws java.io.IOException
Receive CometEvent notification when the underlying tcp communication is started by the client

例外:
java.io.IOException

onTerminate

void onTerminate(CometEvent event)
                 throws java.io.IOException
Receive CometEvent notification when the underlying tcp communication is closed by the CometHandler

例外:
java.io.IOException

onInterrupt

void onInterrupt(CometEvent event)
                 throws java.io.IOException
Receive CometEvent notification when the underlying tcp communication is resumed by the Grizzly ARP.

例外:
java.io.IOException