Package io.netty.channel.nio
Class AbstractNioMessageChannel
- java.lang.Object
- 
- io.netty.util.DefaultAttributeMap
- 
- io.netty.channel.AbstractChannel
- 
- io.netty.channel.nio.AbstractNioChannel
- 
- io.netty.channel.nio.AbstractNioMessageChannel
 
 
 
 
- 
- All Implemented Interfaces:
- Channel,- ChannelOutboundInvoker,- AttributeMap,- java.lang.Comparable<Channel>
 - Direct Known Subclasses:
- NioDatagramChannel,- NioSctpChannel,- NioSctpServerChannel,- NioServerDomainSocketChannel,- NioServerSocketChannel,- NioUdtAcceptorChannel,- NioUdtMessageConnectorChannel
 
 public abstract class AbstractNioMessageChannel extends AbstractNioChannel AbstractNioChannelbase class forChannels that operate on messages.
- 
- 
Nested Class Summary- 
Nested classes/interfaces inherited from class io.netty.channel.nio.AbstractNioChannelAbstractNioChannel.AbstractNioUnsafe, AbstractNioChannel.NioUnsafe
 - 
Nested classes/interfaces inherited from class io.netty.channel.AbstractChannelAbstractChannel.AbstractUnsafe
 - 
Nested classes/interfaces inherited from interface io.netty.channel.ChannelChannel.Unsafe
 
- 
 - 
Field Summary- 
Fields inherited from class io.netty.channel.nio.AbstractNioChannelreadInterestOp, readOps
 
- 
 - 
Constructor SummaryConstructors Modifier Constructor Description protectedAbstractNioMessageChannel(Channel parent, java.nio.channels.SelectableChannel ch, int readInterestOp)protectedAbstractNioMessageChannel(Channel parent, java.nio.channels.SelectableChannel ch, NioIoOps readOps)
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected booleancloseOnReadError(java.lang.Throwable cause)protected booleancontinueOnWriteError()Returnstrueif we should continue the write loop on a write error.protected booleancontinueReading(RecvByteBufAllocator.Handle allocHandle)protected voiddoBeginRead()Schedule a read operation.protected abstract intdoReadMessages(java.util.List<java.lang.Object> buf)Read messages into the given array and return the amount which was read.protected voiddoWrite(ChannelOutboundBuffer in)Flush the content of the given buffer to the remote peer.protected abstract booleandoWriteMessage(java.lang.Object msg, ChannelOutboundBuffer in)Write a message to the underlyingChannel.protected AbstractNioChannel.AbstractNioUnsafenewUnsafe()Create a newAbstractChannel.AbstractUnsafeinstance which will be used for the life-time of theChannel- 
Methods inherited from class io.netty.channel.nio.AbstractNioChanneladdAndSubmit, clearReadPending, doClose, doConnect, doDeregister, doFinishConnect, doRegister, isCompatible, isOpen, isReadPending, javaChannel, newDirectBuffer, newDirectBuffer, registration, removeAndSubmit, selectionKey, setReadPending, unsafe
 - 
Methods inherited from class io.netty.channel.AbstractChannelcloseFuture, compareTo, doBind, doDisconnect, doRegister, doShutdownOutput, equals, eventLoop, filterOutboundMessage, hashCode, id, invalidateLocalAddress, invalidateRemoteAddress, isRegistered, localAddress, localAddress0, maxMessagesPerWrite, newChannelPipeline, newId, parent, pipeline, remoteAddress, remoteAddress0, toString, validateFileRegion, voidPromise
 - 
Methods inherited from class io.netty.util.DefaultAttributeMapattr, hasAttr
 - 
Methods inherited from class java.lang.Objectclone, finalize, getClass, notify, notifyAll, wait, wait, wait
 - 
Methods inherited from interface io.netty.util.AttributeMapattr, hasAttr
 - 
Methods inherited from interface io.netty.channel.Channelalloc, bind, bind, bytesBeforeUnwritable, bytesBeforeWritable, close, close, config, connect, connect, connect, connect, deregister, deregister, disconnect, disconnect, flush, getOption, isActive, isWritable, metadata, newFailedFuture, newProgressivePromise, newPromise, newSucceededFuture, read, setOption, write, write, writeAndFlush, writeAndFlush
 
- 
 
- 
- 
- 
Constructor Detail- 
AbstractNioMessageChannelprotected AbstractNioMessageChannel(Channel parent, java.nio.channels.SelectableChannel ch, int readInterestOp) 
 
- 
 - 
Method Detail- 
newUnsafeprotected AbstractNioChannel.AbstractNioUnsafe newUnsafe() Description copied from class:AbstractChannelCreate a newAbstractChannel.AbstractUnsafeinstance which will be used for the life-time of theChannel- Specified by:
- newUnsafein class- AbstractChannel
 
 - 
doBeginReadprotected void doBeginRead() throws java.lang.ExceptionDescription copied from class:AbstractChannelSchedule a read operation.- Overrides:
- doBeginReadin class- AbstractNioChannel
- Throws:
- java.lang.Exception
 
 - 
continueReadingprotected boolean continueReading(RecvByteBufAllocator.Handle allocHandle) 
 - 
doWriteprotected void doWrite(ChannelOutboundBuffer in) throws java.lang.Exception Description copied from class:AbstractChannelFlush the content of the given buffer to the remote peer.- Specified by:
- doWritein class- AbstractChannel
- Throws:
- java.lang.Exception
 
 - 
continueOnWriteErrorprotected boolean continueOnWriteError() Returnstrueif we should continue the write loop on a write error.
 - 
closeOnReadErrorprotected boolean closeOnReadError(java.lang.Throwable cause) 
 - 
doReadMessagesprotected abstract int doReadMessages(java.util.List<java.lang.Object> buf) throws java.lang.ExceptionRead messages into the given array and return the amount which was read.- Throws:
- java.lang.Exception
 
 - 
doWriteMessageprotected abstract boolean doWriteMessage(java.lang.Object msg, ChannelOutboundBuffer in) throws java.lang.ExceptionWrite a message to the underlyingChannel.- Returns:
- trueif and only if the message has been written
- Throws:
- java.lang.Exception
 
 
- 
 
-