Package io.netty.channel
The core channel API which is asynchronous and event-driven abstraction of
various transports such as a
NIO Channel.
-
Interface Summary Interface Description AddressedEnvelope<M,A extends java.net.SocketAddress> A message that wraps another message with a sender address and a recipient address.Channel A nexus to a network socket or a component which is capable of I/O operations such as read, write, connect, and bind.Channel.Unsafe Unsafe operations that should never be called from user-code.ChannelConfig A set of configuration properties of aChannel
.ChannelFactory<T extends Channel> Creates a newChannel
.ChannelFlushPromiseNotifier.FlushCheckpoint ChannelFuture The result of an asynchronousChannel
I/O operation.ChannelFutureListener Listens to the result of aChannelFuture
.ChannelHandler Handles an I/O event or intercepts an I/O operation, and forwards it to its next handler in itsChannelPipeline
.ChannelHandlerContext Enables aChannelHandler
to interact with itsChannelPipeline
and other handlers.ChannelId Represents the globally unique identifier of aChannel
.ChannelInboundHandler ChannelHandler
which adds callbacks for state changes.ChannelInboundInvoker ChannelOutboundBuffer.MessageProcessor ChannelOutboundHandler ChannelHandler
which will get notified for IO-outbound-operations.ChannelOutboundInvoker ChannelPipeline A list ofChannelHandler
s which handles or intercepts inbound events and outbound operations of aChannel
.ChannelProgressiveFuture An specialChannelFuture
which is used to indicate theFileRegion
transfer progressChannelProgressiveFutureListener AnEventListener
listener which will be called once the sending task associated with future is being transferred.ChannelProgressivePromise SpecialChannelPromise
which will be notified once the associated bytes is transferring.ChannelPromise SpecialChannelFuture
which is writable.EventLoop Will handle all the I/O operations for aChannel
once registered.EventLoopGroup SpecialEventExecutorGroup
which allows registeringChannel
s that get processed for later selection during the event loop.EventLoopTaskQueueFactory Factory used to createQueue
instances that will be used to store tasks for anEventLoop
.FileRegion A region of a file that is sent via aChannel
which supports zero-copy file transfer.MaxBytesRecvByteBufAllocator RecvByteBufAllocator
that limits a read operation based upon a maximum value per individual read and a maximum amount when a read operation is attempted by the event loop.MaxMessagesRecvByteBufAllocator RecvByteBufAllocator
that limits the number of read operations that will be attempted when a read operation is attempted by the event loop.MessageSizeEstimator Responsible to estimate the size of a message.MessageSizeEstimator.Handle RecvByteBufAllocator Allocates a new receive buffer whose capacity is probably large enough to read all inbound data and small enough not to waste its space.RecvByteBufAllocator.ExtendedHandle RecvByteBufAllocator.Handle Deprecated. SelectStrategy Select strategy interface.SelectStrategyFactory Factory that creates a newSelectStrategy
every time.ServerChannel -
Class Summary Class Description AbstractChannel A skeletalChannel
implementation.AbstractChannel.CloseFuture AbstractChannelHandlerContext AbstractChannelHandlerContext.Tasks AbstractChannelHandlerContext.WriteTask AbstractCoalescingBufferQueue AbstractEventLoop Skeletal implementation ofEventLoop
.AbstractEventLoopGroup Skeletal implementation ofEventLoopGroup
.AbstractServerChannel A skeletal server-sideChannel
implementation.AdaptiveRecvByteBufAllocator TheRecvByteBufAllocator
that automatically increases and decreases the predicted buffer size on feed back.ChannelDuplexHandler ChannelHandler
implementation which represents a combination out of aChannelInboundHandler
and theChannelOutboundHandler
.ChannelFlushPromiseNotifier This implementation allows to registerChannelFuture
instances which will get notified once some amount of data was written and so a checkpoint was reached.ChannelFlushPromiseNotifier.DefaultFlushCheckpoint ChannelHandlerAdapter Skeleton implementation of aChannelHandler
.ChannelHandlerMask ChannelInboundHandlerAdapter Abstract base class forChannelInboundHandler
implementations which provide implementations of all of their methods.ChannelInitializer<C extends Channel> A specialChannelInboundHandler
which offers an easy way to initialize aChannel
once it was registered to itsEventLoop
.ChannelMetadata Represents the properties of aChannel
implementation.ChannelOption<T> AChannelOption
allows to configure aChannelConfig
in a type-safe way.ChannelOutboundBuffer (Transport implementors only) an internal data structure used byAbstractChannel
to store its pending outbound write requests.ChannelOutboundBuffer.Entry ChannelOutboundHandlerAdapter Skeleton implementation of aChannelOutboundHandler
.ChannelPromiseAggregator Deprecated. UsePromiseCombiner
Class which is used to consolidate multiple channel futures into one, by listening to the individual futures and producing an aggregated result (success/failure) when all futures have completed.ChannelPromiseNotifier Deprecated. usePromiseNotifier
.CoalescingBufferQueue A FIFO queue of bytes where producers add bytes by repeatedly addingByteBuf
and consumers take bytes in arbitrary lengths.CombinedChannelDuplexHandler<I extends ChannelInboundHandler,O extends ChannelOutboundHandler> CombinedChannelDuplexHandler.DelegatingChannelHandlerContext CompleteChannelFuture A skeletalChannelFuture
implementation which represents aChannelFuture
which has been completed already.DefaultAddressedEnvelope<M,A extends java.net.SocketAddress> The defaultAddressedEnvelope
implementation.DefaultChannelConfig The defaultChannelConfig
implementation.DefaultChannelHandlerContext DefaultChannelId The defaultChannelId
implementation.DefaultChannelPipeline The defaultChannelPipeline
implementation.DefaultChannelPipeline.PendingHandlerCallback DefaultChannelProgressivePromise The defaultChannelProgressivePromise
implementation.DefaultChannelPromise The defaultChannelPromise
implementation.DefaultEventLoop DefaultEventLoopGroup MultithreadEventLoopGroup
which must be used for the local transport.DefaultFileRegion DefaultMaxBytesRecvByteBufAllocator TheRecvByteBufAllocator
that yields a buffer size prediction based upon decrementing the value from the max bytes per read.DefaultMaxMessagesRecvByteBufAllocator Default implementation ofMaxMessagesRecvByteBufAllocator
which respectsChannelConfig.isAutoRead()
and also prevents overflow.DefaultMessageSizeEstimator DefaultMessageSizeEstimator
implementation which supports the estimation of the size ofByteBuf
,ByteBufHolder
andFileRegion
.DefaultMessageSizeEstimator.HandleImpl DefaultSelectStrategy Default select strategy.DefaultSelectStrategyFactory Factory which uses the default select strategy.DelegatingChannelPromiseNotifier FailedChannelFuture TheCompleteChannelFuture
which is failed already.FixedRecvByteBufAllocator TheRecvByteBufAllocator
that always yields the same buffer size prediction.MultithreadEventLoopGroup Abstract base class forEventLoopGroup
implementations that handles their tasks with multiple threads at the same time.PendingBytesTracker PendingBytesTracker.ChannelOutboundBufferPendingBytesTracker PendingBytesTracker.DefaultChannelPipelinePendingBytesTracker PendingBytesTracker.NoopPendingBytesTracker PendingWriteQueue A queue of write operations which are pending for later execution.PendingWriteQueue.PendingWrite Holds all meta-data and construct the linked-list structure.PreferHeapByteBufAllocator Wraps anotherByteBufAllocator
and use heapbuffers everywhere except when a direct buffer is explicit requested.RecvByteBufAllocator.DelegatingHandle ARecvByteBufAllocator.Handle
which delegates all call to some otherRecvByteBufAllocator.Handle
.ReflectiveChannelFactory<T extends Channel> AChannelFactory
that instantiates a newChannel
by invoking its default constructor reflectively.ServerChannelRecvByteBufAllocator MaxMessagesRecvByteBufAllocator
implementation which should be used forServerChannel
s.SimpleChannelInboundHandler<I> ChannelInboundHandlerAdapter
which allows to explicit only handle a specific type of messages.SimpleUserEventChannelHandler<I> ChannelInboundHandlerAdapter
which allows to conveniently only handle a specific type of user events.SingleThreadEventLoop Abstract base class forEventLoop
s that execute all its submitted tasks in a single thread.SingleThreadEventLoop.ChannelsReadOnlyIterator<T extends Channel> SucceededChannelFuture TheCompleteChannelFuture
which is succeeded already.ThreadPerChannelEventLoop Deprecated. this will be remove in the next-major release.ThreadPerChannelEventLoopGroup Deprecated. this will be remove in the next-major release.VoidChannelPromise WriteBufferWaterMark WriteBufferWaterMark is used to set low water mark and high water mark for the write buffer. -
Exception Summary Exception Description AbstractChannel.AnnotatedConnectException AbstractChannel.AnnotatedNoRouteToHostException AbstractChannel.AnnotatedSocketException ChannelException ARuntimeException
which is thrown when an I/O operation fails.ChannelException.StacklessChannelException ChannelPipelineException AChannelException
which is thrown when aChannelPipeline
failed to execute an operation.ConnectTimeoutException ConnectException
which will be thrown if a connection could not be established because of a connection timeout.EventLoopException SpecialChannelException
which will be thrown byEventLoop
andEventLoopGroup
implementations when an error occurs.ExtendedClosedChannelException StacklessClosedChannelException CheapClosedChannelException
that does not fill in the stacktrace. -
Annotation Types Summary Annotation Type Description ChannelHandler.Sharable Indicates that the same instance of the annotatedChannelHandler
can be added to one or moreChannelPipeline
s multiple times without a race condition.ChannelHandlerMask.Skip Indicates that the annotated event handler method inChannelHandler
will not be invoked byChannelPipeline
and so MUST only be used when theChannelHandler
method does nothing except forward to the nextChannelHandler
in the pipeline.