AbstractNioChannel base class for Channels that operate on bytes.
| Modifier and Type | Class and Description |
|---|---|
| protected class |
| Modifier and Type | Field and Description |
|---|---|
| private static final String | |
| private final Runnable | |
| private boolean | |
| private static final ChannelMetadata |
| Access | Constructor and Description |
|---|---|
| protected | AbstractNioByteChannel(Channel
the parent parent, SelectableChannel Channel by which this instance was created. May be nullthe underlying ch)SelectableChannel on which it operatesCreate a new instance |
| Modifier and Type | Method and Description |
|---|---|
| protected final void | |
| protected abstract int | |
| protected void | doWrite(ChannelOutboundBuffer in)
Implements abstract io. |
| protected final int | Returns: The value that should be decremented from the write quantum which starts atChannelConfig#getWriteSpinCount(). The typical use cases are as follows:
the collection which contains objects to write. in)Write objects to the OS. |
| protected abstract int | Returns: amount the amount of written bytesthe buf)ByteBuf from which the bytes should be writtenWrite bytes form the given |
| protected abstract long | Returns: amount the amount of written bytesthe region)FileRegion from which the bytes should be writtenWrite a |
| private int | |
| protected final Object | filterOutboundMessage(Object msg)
Overrides io. ChannelOutboundBuffer of this AbstractChannel, so that
the Channel implementation converts the message to another.
|
| protected final void | |
| private static boolean | |
| protected boolean | |
| public ChannelMetadata | metadata()
Implements io. ChannelMetadata of the Channel which describe the nature of the Channel.
|
| protected AbstractNioChannel. | newUnsafe()
Implements abstract io. AbstractUnsafe instance which will be used for the life-time of the Channel
|
| protected final void | |
| pack-priv final boolean | |
| protected abstract ChannelFuture |
| EXPECTED_TYPES | back to summary |
|---|---|
| private static final String EXPECTED_TYPES | |
| flushTask | back to summary |
|---|---|
| private final Runnable flushTask | |
| inputClosedSeenErrorOnRead | back to summary |
|---|---|
| private boolean inputClosedSeenErrorOnRead | |
| METADATA | back to summary |
|---|---|
| private static final ChannelMetadata METADATA | |
| AbstractNioByteChannel | back to summary |
|---|---|
| protected AbstractNioByteChannel(Channel parent, SelectableChannel ch) Create a new instance
| |
| clearOpWrite | back to summary |
|---|---|
| protected final void clearOpWrite() | |
| doReadBytes | back to summary |
|---|---|
| protected abstract int doReadBytes(ByteBuf buf) throws Exception Read bytes into the given | |
| doWrite | back to summary |
|---|---|
| protected void doWrite(ChannelOutboundBuffer in) throws Exception Implements abstract io. Doc from io. Flush the content of the given buffer to the remote peer.
| |
| doWrite0 | back to summary |
|---|---|
| protected final int doWrite0(ChannelOutboundBuffer in) throws Exception Write objects to the OS.
| |
| doWriteBytes | back to summary |
|---|---|
| protected abstract int doWriteBytes(ByteBuf buf) throws Exception Write bytes form the given | |
| doWriteFileRegion | back to summary |
|---|---|
| protected abstract long doWriteFileRegion(FileRegion region) throws Exception Write a
| |
| doWriteInternal | back to summary |
|---|---|
| private int doWriteInternal(ChannelOutboundBuffer in, Object msg) throws Exception | |
| filterOutboundMessage | back to summary |
|---|---|
| protected final Object filterOutboundMessage(Object msg) Overrides io. Doc from io. Invoked when a new message is added to a
| |
| incompleteWrite | back to summary |
|---|---|
| protected final void incompleteWrite(boolean setOpWrite) | |
| isAllowHalfClosure | back to summary |
|---|---|
| private static boolean isAllowHalfClosure(ChannelConfig config) | |
| isInputShutdown0 | back to summary |
|---|---|
| protected boolean isInputShutdown0() | |
| metadata | back to summary |
|---|---|
| public ChannelMetadata metadata() Implements io. Doc from io. Return the
| |
| newUnsafe | back to summary |
|---|---|
| protected AbstractNioChannel. Implements abstract io. Doc from io. Create a new
| |
| setOpWrite | back to summary |
|---|---|
| protected final void setOpWrite() | |
| shouldBreakReadReady | back to summary |
|---|---|
| pack-priv final boolean shouldBreakReadReady(ChannelConfig config) | |
| shutdownInput | back to summary |
|---|---|
| protected abstract ChannelFuture shutdownInput() Shutdown the input side of the channel. | |
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description |
|---|---|
| private void | |
| private void | handleReadException(ChannelPipeline pipeline, ByteBuf byteBuf, Throwable cause, boolean close, RecvByteBufAllocator.
Deprecated
as a consequence of
RecvByteBufAllocator.Handle being deprecated.
|
| public final void | read()
Implements io. SelectableChannel
|
| NioByteUnsafe | back to summary |
|---|---|
| protected NioByteUnsafe() | |
| closeOnRead | back to summary |
|---|---|
| private void closeOnRead(ChannelPipeline pipeline) | |
| handleReadException | back to summary |
|---|---|
| private void handleReadException(ChannelPipeline pipeline, ByteBuf byteBuf, Throwable cause, boolean close, RecvByteBufAllocator. Deprecated as a consequence of | |
| read | back to summary |
|---|---|
| public final void read() Implements io. Doc from io. Read from underlying
| |