Top Description Inners Fields Constructors Methods
io.netty.channel.nio

public abstract Class AbstractNioMessageChannel

extends AbstractNioChannel
Class Inheritance
Known Direct Subclasses
io.netty.channel.socket.nio.NioDatagramChannel, io.netty.channel.socket.nio.NioServerSocketChannel
Imports
io.netty.channel.Channel, .ChannelConfig, .ChannelOutboundBuffer, .ChannelPipeline, .RecvByteBufAllocator, .ServerChannel, java.io.IOException, java.net.PortUnreachableException, java.nio.channels.SelectableChannel, .SelectionKey, java.util.ArrayList, .List

AbstractNioChannel base class for Channels that operate on messages.

Nested and Inner Type Summary

Modifier and TypeClass and Description
private class

Field Summary

Modifier and TypeField and Description
pack-priv boolean
Inherited from io.netty.channel.nio.AbstractNioChannel:
readInterestOpreadPendingselectionKey

Constructor Summary

AccessConstructor and Description
protected
AbstractNioMessageChannel(Channel parent, SelectableChannel ch, int readInterestOp)

Method Summary

Modifier and TypeMethod and Description
protected boolean
protected boolean
continueOnWriteError()

Returns true if we should continue the write loop on a write error.

protected boolean
continueReading(RecvByteBufAllocator.Handle allocHandle)

Deprecated as a consequence of RecvByteBufAllocator.Handle being deprecated.
protected void
protected abstract int
doReadMessages(List<Object> buf)

Read messages into the given array and return the amount which was read.

protected void
doWrite(ChannelOutboundBuffer in)

Implements abstract io.netty.channel.AbstractChannel.doWrite.

Flush the content of the given buffer to the remote peer.
protected abstract boolean

Returns:

true if and only if the message has been written
doWriteMessage
(Object msg, ChannelOutboundBuffer in)

Write a message to the underlying java.nio.channels.Channel.

protected AbstractNioChannel.AbstractNioUnsafe
newUnsafe()

Implements abstract io.netty.channel.AbstractChannel.newUnsafe.

Create a new AbstractUnsafe instance which will be used for the life-time of the Channel
Inherited from io.netty.channel.nio.AbstractNioChannel:
clearReadPendingdoClosedoConnectdoDeregisterdoFinishConnectdoRegistereventLoopisCompatibleisOpenisReadPendingjavaChannelnewDirectBuffernewDirectBufferselectionKeysetReadPendingunsafe

Field Detail

inputShutdownback to summary
pack-priv boolean inputShutdown

Constructor Detail

AbstractNioMessageChannelback to summary
protected AbstractNioMessageChannel(Channel parent, SelectableChannel ch, int readInterestOp)
See Also
AbstractNioChannel#AbstractNioChannel(Channel, SelectableChannel, int)

Method Detail

closeOnReadErrorback to summary
protected boolean closeOnReadError(Throwable cause)
continueOnWriteErrorback to summary
protected boolean continueOnWriteError()

Returns true if we should continue the write loop on a write error.

continueReadingback to summary
protected boolean continueReading(RecvByteBufAllocator.Handle allocHandle)

Deprecated

as a consequence of RecvByteBufAllocator.Handle being deprecated. See corresponding docs for further information.

doBeginReadback to summary
protected void doBeginRead() throws Exception

Overrides io.netty.channel.nio.AbstractNioChannel.doBeginRead.

Doc from io.netty.channel.AbstractChannel.doBeginRead.

Schedule a read operation.

Annotations
@Override
doReadMessagesback to summary
protected abstract int doReadMessages(List<Object> buf) throws Exception

Read messages into the given array and return the amount which was read.

doWriteback to summary
protected void doWrite(ChannelOutboundBuffer in) throws Exception

Implements abstract io.netty.channel.AbstractChannel.doWrite.

Doc from io.netty.channel.AbstractChannel.doWrite.

Flush the content of the given buffer to the remote peer.

Annotations
@Override
doWriteMessageback to summary
protected abstract boolean doWriteMessage(Object msg, ChannelOutboundBuffer in) throws Exception

Write a message to the underlying java.nio.channels.Channel.

Returns:boolean

true if and only if the message has been written

newUnsafeback to summary
protected AbstractNioChannel.AbstractNioUnsafe newUnsafe()

Implements abstract io.netty.channel.AbstractChannel.newUnsafe.

Doc from io.netty.channel.AbstractChannel.newUnsafe.

Create a new AbstractUnsafe instance which will be used for the life-time of the Channel

Annotations
@Override
io.netty.channel.nio back to summary

private final Class AbstractNioMessageChannel.NioMessageUnsafe

extends AbstractNioUnsafe
Class Inheritance

Field Summary

Modifier and TypeField and Description
private final List<Object>

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public void
Inherited from io.netty.channel.nio.AbstractNioChannel.AbstractNioUnsafe:
chconnectfinishConnectflush0forceFlushremoveReadOp

Field Detail

readBufback to summary
private final List<Object> readBuf

Constructor Detail

NioMessageUnsafeback to summary
private NioMessageUnsafe()

Method Detail

readback to summary
public void read()

Implements io.netty.channel.nio.AbstractNioChannel.NioUnsafe.read.

Doc from io.netty.channel.nio.AbstractNioChannel.NioUnsafe.read.

Read from underlying SelectableChannel

Annotations
@Override