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, Comparable<Channel>
- Direct Known Subclasses:
NioDatagramChannel, NioSctpChannel, NioSctpServerChannel, NioServerDomainSocketChannel, NioServerSocketChannel, NioUdtAcceptorChannel, NioUdtMessageConnectorChannel
AbstractNioChannel base class for Channels that operate on messages.-
Nested Class Summary
Nested classes/interfaces inherited from class AbstractNioChannel
AbstractNioChannel.AbstractNioUnsafe, AbstractNioChannel.NioUnsafeNested classes/interfaces inherited from class AbstractChannel
AbstractChannel.AbstractUnsafeNested classes/interfaces inherited from interface Channel
Channel.Unsafe -
Field Summary
Fields inherited from class AbstractNioChannel
readInterestOp, readOps -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractNioMessageChannel(Channel parent, SelectableChannel ch, int readInterestOp) protectedAbstractNioMessageChannel(Channel parent, SelectableChannel ch, NioIoOps readOps) -
Method Summary
Modifier and TypeMethodDescriptionprotected booleancloseOnReadError(Throwable cause) protected booleanReturnstrueif we should continue the write loop on a write error.protected booleancontinueReading(RecvByteBufAllocator.Handle allocHandle) protected voidSchedule a read operation.protected abstract intdoReadMessages(List<Object> buf) Read messages into the given array and return the amount which was read.protected voidFlush the content of the given buffer to the remote peer.protected abstract booleandoWriteMessage(Object msg, ChannelOutboundBuffer in) Write a message to the underlyingChannel.protected AbstractNioChannel.AbstractNioUnsafeCreate a newAbstractChannel.AbstractUnsafeinstance which will be used for the life-time of theChannelMethods inherited from class AbstractNioChannel
addAndSubmit, clearReadPending, doClose, doConnect, doDeregister, doFinishConnect, doRegister, isCompatible, isOpen, isReadPending, javaChannel, newDirectBuffer, newDirectBuffer, registration, removeAndSubmit, selectionKey, setReadPending, unsafeMethods inherited from class AbstractChannel
closeFuture, compareTo, doBind, doDisconnect, doRegister, doShutdownOutput, equals, eventLoop, filterOutboundMessage, hashCode, id, invalidateLocalAddress, invalidateRemoteAddress, isRegistered, localAddress, localAddress0, maxMessagesPerWrite, newChannelPipeline, newId, parent, pipeline, remoteAddress, remoteAddress0, toString, validateFileRegion, voidPromiseMethods inherited from class DefaultAttributeMap
attr, hasAttrMethods inherited from interface AttributeMap
attr, hasAttrMethods inherited from interface Channel
alloc, 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 Details
-
AbstractNioMessageChannel
-
AbstractNioMessageChannel
-
-
Method Details
-
newUnsafe
Description copied from class:AbstractChannelCreate a newAbstractChannel.AbstractUnsafeinstance which will be used for the life-time of theChannel- Specified by:
newUnsafein classAbstractChannel
-
doBeginRead
Description copied from class:AbstractChannelSchedule a read operation.- Overrides:
doBeginReadin classAbstractNioChannel- Throws:
Exception
-
continueReading
-
doWrite
Description copied from class:AbstractChannelFlush the content of the given buffer to the remote peer.- Specified by:
doWritein classAbstractChannel- Throws:
Exception
-
continueOnWriteError
protected boolean continueOnWriteError()Returnstrueif we should continue the write loop on a write error. -
closeOnReadError
-
doReadMessages
-
doWriteMessage
-