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

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

public class CometReader
extends java.lang.Object

Non blocking IO reader. This class can be used from a CometHandler to execute non blocking read. This is usefull when the client is pipelining data. The CometHandler will be notified as soon as bytes are arriving. CometHandler who wants to be notified just need to register themself by calling CometContext.registerAsyncRead()


コンストラクタの概要
CometReader()
           
 
メソッドの概要
 boolean isReady()
          Return true if this instance is ready to read.
 int read(byte[] buf)
          Read bytes without blocking.
 int read(byte[] buf, int off, int len)
          Read bytes without blocking.
 void recycle()
          Recycle this object.
 void setByteBuffer(java.nio.ByteBuffer byteBuffer)
           
protected  void setChannel(java.nio.channels.SocketChannel socketChannel)
          Set the underlying SocketChannel.
 void setNRead(int nRead)
           
 void setReady(boolean ready)
          false if this instance is no longer ready to read.
 
クラス java.lang.Object から継承されたメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

コンストラクタの詳細

CometReader

public CometReader()
メソッドの詳細

setChannel

protected void setChannel(java.nio.channels.SocketChannel socketChannel)
Set the underlying SocketChannel.


read

public int read(byte[] buf)
         throws java.io.IOException
Read bytes without blocking.

例外:
java.io.IOException

read

public int read(byte[] buf,
                int off,
                int len)
         throws java.io.IOException
Read bytes without blocking.

例外:
java.io.IOException

recycle

public void recycle()
Recycle this object.


setByteBuffer

public void setByteBuffer(java.nio.ByteBuffer byteBuffer)

setNRead

public void setNRead(int nRead)

isReady

public boolean isReady()
Return true if this instance is ready to read.


setReady

public void setReady(boolean ready)
false if this instance is no longer ready to read.