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
.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.IoEvent IoEventLoop IoEventLoopGroup EventLoopGroup
forIoEventLoop
s.IoHandle A handle that can be registered to aIoHandler
.IoHandler Handles IO dispatching for anThreadAwareExecutor
.IoHandlerContext The context for anIoHandler
that is run by anThreadAwareExecutor
.IoHandlerFactory Factory forIoHandler
instances.IoOps An IO op that can be submitted to anIoRegistration
viaIoRegistration.submit(IoOps)
. // * These submittedIoOps
will result inIoEvent
s on the relatedIoHandle
.IoRegistration A registration for IO.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.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.ChannelHandlerAdapter Skeleton implementation of aChannelHandler
.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.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> DefaultAddressedEnvelope<M,A extends java.net.SocketAddress> The defaultAddressedEnvelope
implementation.DefaultChannelConfig The defaultChannelConfig
implementation.DefaultChannelId The defaultChannelId
implementation.DefaultChannelPipeline The defaultChannelPipeline
implementation.DefaultChannelProgressivePromise The defaultChannelProgressivePromise
implementation.DefaultChannelPromise The defaultChannelPromise
implementation.DefaultEventLoop DefaultEventLoopGroup Deprecated. 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
.DefaultSelectStrategyFactory Factory which uses the default select strategy.DelegatingChannelPromiseNotifier FixedRecvByteBufAllocator TheRecvByteBufAllocator
that always yields the same buffer size prediction.ManualIoEventLoop IoEventLoop
implementation that is owned by the user and so needs to be driven by the user manually with the givenThread
.MultithreadEventLoopGroup Abstract base class forEventLoopGroup
implementations that handles their tasks with multiple threads at the same time.MultiThreadIoEventLoopGroup IoEventLoopGroup
implementation that will handle its tasks with multiple threads.PendingWriteQueue A queue of write operations which are pending for later execution.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> SingleThreadIoEventLoop IoEventLoop
implementation that execute all its submitted tasks in a single thread using the providedIoHandler
.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 ChannelException ARuntimeException
which is thrown when an I/O operation fails.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. -
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.