public class ChannelAsyncInputStream extends AbstractCloseable implements IoInputStream, ChannelHolder
| Modifier and Type | Class and Description |
|---|---|
static class |
ChannelAsyncInputStream.IoReadFutureImpl |
AbstractCloseable.State| Modifier and Type | Field and Description |
|---|---|
private Buffer |
buffer |
private Channel |
channelInstance |
private ChannelAsyncInputStream.IoReadFutureImpl |
pending |
private java.lang.Object |
readFutureId |
closeFuture, lock, statelogCLOSE_WAIT_TIMEOUT, DEFAULT_CLOSE_WAIT_TIMEOUT| Constructor and Description |
|---|
ChannelAsyncInputStream(Channel channel) |
| Modifier and Type | Method and Description |
|---|---|
protected CloseFuture |
doCloseGracefully() |
private void |
doRead(boolean resume) |
Channel |
getChannel() |
protected void |
preClose()
preClose is guaranteed to be called before doCloseGracefully or doCloseImmediately.
|
IoReadFuture |
read(Buffer buf)
NOTE: the buffer must not be touched until the returned read future is completed.
|
java.lang.String |
toString() |
void |
write(Readable src) |
addCloseFutureListener, builder, close, doCloseImmediately, isClosed, isClosing, removeCloseFutureListenergetSimplifiedLoggerclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddCloseFutureListener, close, close, close, getMaxCloseWaitTime, isClosed, isClosing, isOpen, removeCloseFutureListenerprivate final Channel channelInstance
private final Buffer buffer
private final java.lang.Object readFutureId
private ChannelAsyncInputStream.IoReadFutureImpl pending
public ChannelAsyncInputStream(Channel channel)
public Channel getChannel()
getChannel in interface ChannelHolderChannel instancepublic void write(Readable src) throws java.io.IOException
java.io.IOExceptionpublic IoReadFuture read(Buffer buf)
IoInputStreamread in interface IoInputStreambuf - the Buffer to useIoReadFuture for the operationprotected void preClose()
AbstractCloseablepreClose in class AbstractCloseableprotected CloseFuture doCloseGracefully()
doCloseGracefully in class AbstractCloseableprivate void doRead(boolean resume)
public java.lang.String toString()
toString in class java.lang.Object