public abstract class AbstractNioMessageChannel extends AbstractNioChannel
AbstractNioChannel base class for Channels that operate on messages.| Modifier and Type | Class and Description |
|---|---|
private class |
AbstractNioMessageChannel.NioMessageUnsafe |
AbstractNioChannel.AbstractNioUnsafe, AbstractNioChannel.NioUnsafeAbstractChannel.AbstractUnsafeChannel.Unsafe| Modifier and Type | Field and Description |
|---|---|
(package private) boolean |
inputShutdown |
readInterestOp, readPending, selectionKey| Modifier | Constructor and Description |
|---|---|
protected |
AbstractNioMessageChannel(Channel parent,
java.nio.channels.SelectableChannel ch,
int readInterestOp) |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
closeOnReadError(java.lang.Throwable cause) |
protected boolean |
continueOnWriteError()
Returns
true if we should continue the write loop on a write error. |
protected void |
doBeginRead()
Schedule a read operation.
|
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 |
clearReadPending, doClose, doConnect, doDeregister, doFinishConnect, doRegister, eventLoop, isCompatible, isOpen, isReadPending, javaChannel, newDirectBuffer, newDirectBuffer, selectionKey, setReadPending, unsafealloc, bind, bind, bytesBeforeUnwritable, bytesBeforeWritable, close, close, closeFuture, compareTo, connect, connect, connect, connect, deregister, deregister, disconnect, disconnect, doBind, doDisconnect, equals, filterOutboundMessage, flush, hashCode, id, invalidateLocalAddress, invalidateRemoteAddress, isRegistered, isWritable, localAddress, localAddress0, newChannelPipeline, newFailedFuture, newId, newProgressivePromise, newPromise, newSucceededFuture, parent, pipeline, read, remoteAddress, remoteAddress0, toString, voidPromise, write, write, writeAndFlush, writeAndFlushattr, hasAttrclone, finalize, getClass, notify, notifyAll, wait, wait, waitattr, hasAttrprotected AbstractNioMessageChannel(Channel parent, java.nio.channels.SelectableChannel ch, int readInterestOp)
protected AbstractNioChannel.AbstractNioUnsafe newUnsafe()
AbstractChannelAbstractChannel.AbstractUnsafe instance which will be used for the life-time of the ChannelnewUnsafe in class AbstractChannelprotected void doBeginRead()
throws java.lang.Exception
AbstractChanneldoBeginRead in class AbstractNioChanneljava.lang.Exceptionprotected void doWrite(ChannelOutboundBuffer in) throws java.lang.Exception
AbstractChanneldoWrite in class AbstractChanneljava.lang.Exceptionprotected 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.Exceptionprotected 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