public abstract class AbstractNioMessageChannel extends AbstractNioChannel
AbstractNioChannel base class for Channels that operate on messages.AbstractNioChannel.AbstractNioUnsafe, AbstractNioChannel.NioUnsafeAbstractChannel.AbstractUnsafeChannel.UnsafereadInterestOp| Modifier | Constructor and Description |
|---|---|
protected |
AbstractNioMessageChannel(Channel parent,
Integer id,
SelectableChannel ch,
int readInterestOp) |
| Modifier and Type | Method and Description |
|---|---|
protected abstract int |
doReadMessages(MessageList<Object> buf)
Read messages into the given array and return the amount which was read.
|
protected int |
doWrite(MessageList<Object> msgs,
int index)
Flush the content of the given
ByteBuf to the remote peer. |
protected abstract int |
doWriteMessages(MessageList<Object> msg,
int index,
boolean lastSpin)
Write messages 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, doConnect, doDeregister, doFinishConnect, doRegister, eventLoop, isCompatible, isFlushPending, isInputShutdown, isOpen, javaChannel, selectionKey, unsafealloc, bind, bind, calculateMessageSize, checkEOF, close, close, closeFuture, compareTo, connect, connect, connect, connect, deregister, deregister, disconnect, disconnect, doBind, doClose, doDisconnect, doPreClose, equals, hashCode, id, invalidateLocalAddress, invalidateRemoteAddress, isRegistered, isWritable, localAddress, localAddress0, newFailedFuture, newProgressivePromise, newPromise, newSucceededFuture, parent, pipeline, read, remoteAddress, remoteAddress0, toString, voidPromise, write, write, write, writeprotected AbstractNioMessageChannel(Channel parent, Integer id, SelectableChannel ch, int readInterestOp)
AbstractNioChannel#AbstractNioChannel(Channel, Integer, SelectableChannel, int)}protected AbstractNioChannel.AbstractNioUnsafe newUnsafe()
AbstractChannelAbstractChannel.AbstractUnsafe instance which will be used for the life-time of the ChannelnewUnsafe in class AbstractChannelprotected int doWrite(MessageList<Object> msgs, int index) throws Exception
AbstractChannelByteBuf to the remote peer.
Sub-classes may override this as this implementation will just thrown an UnsupportedOperationExceptiondoWrite in class AbstractChannelExceptionprotected abstract int doReadMessages(MessageList<Object> buf) throws Exception
Exceptionprotected abstract int doWriteMessages(MessageList<Object> msg, int index, boolean lastSpin) throws Exception
Channel.msg - Object to writelastSpin - true if this is the last write tryException - thrown if an error accourCopyright © 2008-2013 The Netty Project. All Rights Reserved.