public abstract class AbstractNioMessageChannel extends AbstractNioChannel
AbstractNioChannel
base class for Channel
s that operate on messages.AbstractNioChannel.AbstractNioUnsafe, AbstractNioChannel.NioUnsafe
AbstractChannel.AbstractUnsafe
Channel.Unsafe
readInterestOp
限定符 | 构造器和说明 |
---|---|
protected |
AbstractNioMessageChannel(Channel parent,
java.nio.channels.SelectableChannel ch,
int readInterestOp) |
限定符和类型 | 方法和说明 |
---|---|
protected boolean |
closeOnReadError(java.lang.Throwable cause) |
protected boolean |
continueOnWriteError()
Returns
true if we should continue the write loop on a write error. |
protected abstract int |
doReadMessages(java.util.List<java.lang.Object> buf)
Read messages into the given array and return the amount which was read.
|
protected void |
doWrite(ChannelOutboundBuffer in)
Flush the content of the given buffer to the remote peer.
|
protected abstract boolean |
doWriteMessage(java.lang.Object msg,
ChannelOutboundBuffer in)
Write a message to the underlying
Channel . |
protected AbstractNioChannel.AbstractNioUnsafe |
newUnsafe()
Create a new
AbstractChannel.AbstractUnsafe instance which will be used for the life-time of the Channel |
doBeginRead, doClose, doConnect, doDeregister, doFinishConnect, doRegister, eventLoop, isCompatible, isInputShutdown, isOpen, isReadPending, javaChannel, newDirectBuffer, newDirectBuffer, selectionKey, setReadPending, unsafe
alloc, bind, bind, close, close, closeFuture, compareTo, connect, connect, connect, connect, deregister, deregister, disconnect, disconnect, doBind, doDisconnect, doShutdownOutput, equals, filterOutboundMessage, flush, hashCode, invalidateLocalAddress, invalidateRemoteAddress, isRegistered, isWritable, localAddress, localAddress0, newChannelPipeline, newFailedFuture, newProgressivePromise, newPromise, newSucceededFuture, parent, pipeline, read, remoteAddress, remoteAddress0, toString, voidPromise, write, write, writeAndFlush, writeAndFlush
attr
attr
protected AbstractNioMessageChannel(Channel parent, java.nio.channels.SelectableChannel ch, int readInterestOp)
protected AbstractNioChannel.AbstractNioUnsafe newUnsafe()
AbstractChannel
AbstractChannel.AbstractUnsafe
instance which will be used for the life-time of the Channel
newUnsafe
在类中 AbstractChannel
protected void doWrite(ChannelOutboundBuffer in) throws java.lang.Exception
AbstractChannel
doWrite
在类中 AbstractChannel
java.lang.Exception
protected boolean continueOnWriteError()
true
if we should continue the write loop on a write error.protected boolean closeOnReadError(java.lang.Throwable cause)
protected abstract int doReadMessages(java.util.List<java.lang.Object> buf) throws java.lang.Exception
java.lang.Exception
protected abstract boolean doWriteMessage(java.lang.Object msg, ChannelOutboundBuffer in) throws java.lang.Exception
Channel
.true
if and only if the message has been writtenjava.lang.Exception