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

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

public class CometTask
extends TaskBase

A Task implementation that allow Grizzly ARP to notify CometHandler when new data (bytes) are available from the CometSelector.


入れ子のクラスの概要
static class CometTask.OP_EVENT
           
 
フィールドの概要
protected  CometTask.OP_EVENT upcoming_op
          The current non blocking operation.
 
コンストラクタの概要
CometTask()
          New CometTask.
 
メソッドの概要
 void doTask()
          Notify the CometHandler that bytes are available for read.
 CometContext getCometContext()
          Return the CometContext associated with this instance.
 java.nio.channels.SelectionKey getCometKey()
          Return the CometSelector's SelectionKey.
 CometSelector getCometSelector()
          Return the CometSelector
 long getExpirationDelay()
          Return the delay before interrupting the polled request and cancelling the SelectionKey.
 long getExpireTime()
          Return the time in milliseconds before this object was registered the SelectionKey on the CometSelector
 java.nio.channels.SelectionKey getSelectionKey()
          Return the SelectionKey
 boolean isAsyncReadSupported()
           
 void recycle()
          Recycle this object.
 void setAsyncReadSupported(boolean asyncReadSupported)
           
 void setCometContext(CometContext cometContext)
          Set the CometContext used to notify CometHandler.
 void setCometKey(java.nio.channels.SelectionKey cometKey)
          Set the CometSelector's SelectionKey.
 void setCometSelector(CometSelector cometSelector)
          Set the CometSelector
 void setExpirationDelay(long expirationDelay)
          Set the delay before interrupting the polled request and cancelling the SelectionKey.
 void setExpireTime(long expireTime)
          Set the time in milliseconds before this object was registered the SelectionKey on the CometSelector
 void setSelectionKey(java.nio.channels.SelectionKey key)
          Set the SelectionKey
 void taskEvent(TaskEvent event)
          Not used.
 
クラス java.lang.Object から継承されたメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

フィールドの詳細

upcoming_op

protected CometTask.OP_EVENT upcoming_op
The current non blocking operation.

コンストラクタの詳細

CometTask

public CometTask()
New CometTask.

メソッドの詳細

doTask

public void doTask()
            throws java.io.IOException
Notify the CometHandler that bytes are available for read. The notification will invoke all CometContext

例外:
java.io.IOException

taskEvent

public void taskEvent(TaskEvent event)
Not used.


getCometContext

public CometContext getCometContext()
Return the CometContext associated with this instance.

戻り値:
CometContext the CometContext associated with this instance.

setCometContext

public void setCometContext(CometContext cometContext)
Set the CometContext used to notify CometHandler.

パラメータ:
cometContext - the CometContext used to notify CometHandler

getSelectionKey

public java.nio.channels.SelectionKey getSelectionKey()
Return the SelectionKey

戻り値:
SelectionKey SelectionKey

setSelectionKey

public void setSelectionKey(java.nio.channels.SelectionKey key)
Set the SelectionKey

パラメータ:
SelectionKey - SelectionKey

recycle

public void recycle()
Recycle this object.


getCometSelector

public CometSelector getCometSelector()
Return the CometSelector

戻り値:
CometSelector the CometSelector

setCometSelector

public void setCometSelector(CometSelector cometSelector)
Set the CometSelector

パラメータ:
cometSelector - the CometSelector

getExpireTime

public long getExpireTime()
Return the time in milliseconds before this object was registered the SelectionKey on the CometSelector

戻り値:
long Return the time in milliseconds before this object was registered the SelectionKey on the CometSelector

setExpireTime

public void setExpireTime(long expireTime)
Set the time in milliseconds before this object was registered the SelectionKey on the CometSelector

パラメータ:
expireTime - Return the time in milliseconds before this object was registered the SelectionKey on the CometSelector

getExpirationDelay

public long getExpirationDelay()
Return the delay before interrupting the polled request and cancelling the SelectionKey.

戻り値:
long Return the delay before interrupting the polled request and cancelling the SelectionKey.

setExpirationDelay

public void setExpirationDelay(long expirationDelay)
Set the delay before interrupting the polled request and cancelling the SelectionKey.

パラメータ:
expirationDelay - Return the delay before interrupting the polled request and cancelling the SelectionKey.

getCometKey

public java.nio.channels.SelectionKey getCometKey()
Return the CometSelector's SelectionKey.


setCometKey

public void setCometKey(java.nio.channels.SelectionKey cometKey)
Set the CometSelector's SelectionKey.


isAsyncReadSupported

public boolean isAsyncReadSupported()

setAsyncReadSupported

public void setAsyncReadSupported(boolean asyncReadSupported)