com.sun.grizzly.comet
Class CometWriter
java.lang.Object
com.sun.grizzly.comet.CometWriter
- Direct Known Subclasses:
- CometWriter
public class CometWriter
- extends Object
Non blocking Writer. This class can be used from a
CometHandler
to execute non blocking write. If the write was
incomplete, the CometHandler must register itself using
CometContext.registerAsyncWrite()
- Author:
- Jeanfrancois Arcand
Field Summary |
protected byte[] |
chunkLength
Buffer used for chunk length conversion. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
chunkLength
protected byte[] chunkLength
- Buffer used for chunk length conversion.
CometWriter
public CometWriter()
setChannel
protected void setChannel(SocketChannel socketChannel)
write
public int write(byte[] buf)
throws IOException
- Throws:
IOException
write
public int write(byte[] buf,
int off,
int len)
throws IOException
- Throws:
IOException
isComplete
public boolean isComplete()
recycle
public void recycle()
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.
Copyright © 2009 SUN Microsystems. All Rights Reserved.