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
Modifier | Constructor and Description |
---|---|
protected |
AbstractNioMessageChannel(Channel parent,
SelectableChannel ch,
int readInterestOp) |
Modifier and Type | Method and Description |
---|---|
protected boolean |
closeOnReadError(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(List<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(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, unsafe
alloc, 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, writeAndFlush
attr, hasAttr
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
attr, hasAttr
protected AbstractNioMessageChannel(Channel parent, SelectableChannel ch, int readInterestOp)
protected AbstractNioChannel.AbstractNioUnsafe newUnsafe()
AbstractChannel
AbstractChannel.AbstractUnsafe
instance which will be used for the life-time of the Channel
newUnsafe
in class AbstractChannel
protected void doBeginRead() throws Exception
AbstractChannel
doBeginRead
in class AbstractNioChannel
Exception
protected void doWrite(ChannelOutboundBuffer in) throws Exception
AbstractChannel
doWrite
in class AbstractChannel
Exception
protected boolean continueOnWriteError()
true
if we should continue the write loop on a write error.protected boolean closeOnReadError(Throwable cause)
protected abstract int doReadMessages(List<Object> buf) throws Exception
Exception
protected abstract boolean doWriteMessage(Object msg, ChannelOutboundBuffer in) throws Exception
Channel
.true
if and only if the message has been writtenException
Copyright © 2008–2017 The Netty Project. All rights reserved.