public interface InputChannel
| Modifier and Type | Method and Description |
|---|---|
boolean |
isReadable()
Must be called before calling
readAsync(). |
io.netty.buffer.ByteBuf |
readAsync()
Can only be called is isReadable has returned true.
|
io.netty.buffer.ByteBuf |
readBlocking()
Reads some data.
|
int |
readBytesAvailable() |
<T> void |
setReadHandler(BiConsumer<InputChannel,T> handler,
T context)
Registers a read handler that will be called when the channel is readable.
|
io.netty.buffer.ByteBuf readAsync()
throws IOException
IOExceptionboolean isReadable()
readAsync(). If this returns true then data can be read,
if this returns false then a read handler can be registered using setReadHandler(BiConsumer, Object)true if data can be read<T> void setReadHandler(BiConsumer<InputChannel,T> handler, T context)
isReadable() returns falseT - The type of the context objecthandler - The handlercontext - A context object that will be passed to the handlerint readBytesAvailable()
io.netty.buffer.ByteBuf readBlocking()
throws IOException
IOException - on failureCopyright © 2020 JBoss by Red Hat. All rights reserved.