com.nec.webotx.enterprise.web.connector.grizzly.comet
クラス CometSelector

java.lang.Object
  上位を拡張 com.nec.webotx.enterprise.web.connector.grizzly.comet.CometSelector

public class CometSelector
extends java.lang.Object

NIO Selector allowing CometHandler to receive non-blocking requests bytes during request polling.


フィールドの概要
protected  CometEngine cometEngine
          The CometEngine singleton
 
コンストラクタの概要
CometSelector(CometEngine cometEngine)
          New CometSelector
 
メソッドの概要
protected  void cancelKey(java.nio.channels.SelectionKey key)
          Cancel a SelectionKey, and delegate the request polling interruption to the CometEngine
 java.nio.channels.SelectionKey cometKeyFor(java.nio.channels.SelectableChannel channel)
          Return the SelectionKey associated with this channel.
protected  void expireIdleKeys()
          Expires registered SelectionKey.
 void registerKey(java.nio.channels.SelectionKey key, CometTask cometTask)
          Register the SelectionKey/code> to the Selector.
 void start()
          Start the java.nio.channels.Selector running on its Thread.
 void wakeup()
          Wakes up the java.nio.channels.Selector
 
クラス java.lang.Object から継承されたメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

フィールドの詳細

cometEngine

protected CometEngine cometEngine
The CometEngine singleton

コンストラクタの詳細

CometSelector

public CometSelector(CometEngine cometEngine)
New CometSelector

パラメータ:
cometEngine - The CometEngine singleton
メソッドの詳細

start

public void start()
Start the java.nio.channels.Selector running on its Thread.


expireIdleKeys

protected void expireIdleKeys()
Expires registered SelectionKey. If a SelectionKey is expired, the request will be resumed and the HTTP request will complete,


cancelKey

protected void cancelKey(java.nio.channels.SelectionKey key)
Cancel a SelectionKey, and delegate the request polling interruption to the CometEngine

パラメータ:
key - the expired SelectionKey

registerKey

public void registerKey(java.nio.channels.SelectionKey key,
                        CometTask cometTask)
Register the SelectionKey/code> to the Selector. We cannot register the SelectionKey/code> directy on the Selector because there is a deadlock in the VM (see bug XXX).


wakeup

public void wakeup()
Wakes up the java.nio.channels.Selector


cometKeyFor

public java.nio.channels.SelectionKey cometKeyFor(java.nio.channels.SelectableChannel channel)
Return the SelectionKey associated with this channel.