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 asynchronousChannelI/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 aChannelHandlerto interact with itsChannelPipelineand other handlers.ChannelId Represents the globally unique identifier of aChannel.ChannelInboundHandler ChannelHandlerwhich adds callbacks for state changes.ChannelInboundInvoker ChannelOutboundBuffer.MessageProcessor ChannelOutboundHandler ChannelHandlerwhich will get notified for IO-outbound-operations.ChannelOutboundInvoker ChannelPipeline A list ofChannelHandlers which handles or intercepts inbound events and outbound operations of aChannel.ChannelProgressiveFuture An specialChannelFuturewhich is used to indicate theFileRegiontransfer progressChannelProgressiveFutureListener AnEventListenerlistener which will be called once the sending task associated with future is being transferred.ChannelProgressivePromise SpecialChannelPromisewhich will be notified once the associated bytes is transferring.ChannelPromise SpecialChannelFuturewhich is writable.EventLoop Will handle all the I/O operations for aChannelonce registered.EventLoopGroup SpecialEventExecutorGroupwhich allows registeringChannels that get processed for later selection during the event loop.EventLoopTaskQueueFactory Factory used to createQueueinstances that will be used to store tasks for anEventLoop.FileRegion A region of a file that is sent via aChannelwhich supports zero-copy file transfer.MaxBytesRecvByteBufAllocator RecvByteBufAllocatorthat 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 RecvByteBufAllocatorthat 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 newSelectStrategyevery time.ServerChannel -
Class Summary Class Description AbstractChannel A skeletalChannelimplementation.AbstractChannel.CloseFuture AbstractChannelHandlerContext AbstractChannelHandlerContext.Tasks AbstractChannelHandlerContext.WriteTask AbstractCoalescingBufferQueue AbstractEventLoop Skeletal implementation ofEventLoop.AbstractEventLoopGroup Skeletal implementation ofEventLoopGroup.AbstractServerChannel A skeletal server-sideChannelimplementation.AdaptiveRecvByteBufAllocator TheRecvByteBufAllocatorthat automatically increases and decreases the predicted buffer size on feed back.ChannelDuplexHandler ChannelHandlerimplementation which represents a combination out of aChannelInboundHandlerand theChannelOutboundHandler.ChannelFlushPromiseNotifier This implementation allows to registerChannelFutureinstances 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 forChannelInboundHandlerimplementations which provide implementations of all of their methods.ChannelInitializer<C extends Channel> A specialChannelInboundHandlerwhich offers an easy way to initialize aChannelonce it was registered to itsEventLoop.ChannelMetadata Represents the properties of aChannelimplementation.ChannelOption<T> AChannelOptionallows to configure aChannelConfigin a type-safe way.ChannelOutboundBuffer (Transport implementors only) an internal data structure used byAbstractChannelto store its pending outbound write requests.ChannelOutboundBuffer.Entry ChannelOutboundHandlerAdapter Skeleton implementation of aChannelOutboundHandler.ChannelPromiseAggregator Deprecated. UsePromiseCombinerClass 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 ChannelFutureListener implementation which takes otherChannelPromise(s) and notifies them on completion.CoalescingBufferQueue A FIFO queue of bytes where producers add bytes by repeatedly addingByteBufand consumers take bytes in arbitrary lengths.CombinedChannelDuplexHandler<I extends ChannelInboundHandler,O extends ChannelOutboundHandler> CombinedChannelDuplexHandler.DelegatingChannelHandlerContext CompleteChannelFuture A skeletalChannelFutureimplementation which represents aChannelFuturewhich has been completed already.DefaultAddressedEnvelope<M,A extends java.net.SocketAddress> The defaultAddressedEnvelopeimplementation.DefaultChannelConfig The defaultChannelConfigimplementation.DefaultChannelHandlerContext DefaultChannelId The defaultChannelIdimplementation.DefaultChannelPipeline The defaultChannelPipelineimplementation.DefaultChannelPipeline.PendingHandlerCallback DefaultChannelProgressivePromise The defaultChannelProgressivePromiseimplementation.DefaultChannelPromise The defaultChannelPromiseimplementation.DefaultEventLoop DefaultEventLoopGroup MultithreadEventLoopGroupwhich must be used for the local transport.DefaultFileRegion DefaultMaxBytesRecvByteBufAllocator TheRecvByteBufAllocatorthat yields a buffer size prediction based upon decrementing the value from the max bytes per read.DefaultMaxMessagesRecvByteBufAllocator Default implementation ofMaxMessagesRecvByteBufAllocatorwhich respectsChannelConfig.isAutoRead()and also prevents overflow.DefaultMessageSizeEstimator DefaultMessageSizeEstimatorimplementation which supports the estimation of the size ofByteBuf,ByteBufHolderandFileRegion.DefaultMessageSizeEstimator.HandleImpl DefaultSelectStrategy Default select strategy.DefaultSelectStrategyFactory Factory which uses the default select strategy.DelegatingChannelPromiseNotifier FailedChannelFuture TheCompleteChannelFuturewhich is failed already.FixedRecvByteBufAllocator TheRecvByteBufAllocatorthat always yields the same buffer size prediction.MultithreadEventLoopGroup Abstract base class forEventLoopGroupimplementations 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 anotherByteBufAllocatorand use heapbuffers everywhere except when a direct buffer is explicit requested.RecvByteBufAllocator.DelegatingHandle ARecvByteBufAllocator.Handlewhich delegates all call to some otherRecvByteBufAllocator.Handle.ReflectiveChannelFactory<T extends Channel> AChannelFactorythat instantiates a newChannelby invoking its default constructor reflectively.SimpleChannelInboundHandler<I> ChannelInboundHandlerAdapterwhich allows to explicit only handle a specific type of messages.SimpleUserEventChannelHandler<I> ChannelInboundHandlerAdapterwhich allows to conveniently only handle a specific type of user events.SingleThreadEventLoop Abstract base class forEventLoops that execute all its submitted tasks in a single thread.SucceededChannelFuture TheCompleteChannelFuturewhich 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 ARuntimeExceptionwhich is thrown when an I/O operation fails.ChannelPipelineException AChannelExceptionwhich is thrown when aChannelPipelinefailed to execute an operation.ConnectTimeoutException ConnectExceptionwhich will be thrown if a connection could not be established because of a connection timeout.EventLoopException SpecialChannelExceptionwhich will be thrown byEventLoopandEventLoopGroupimplementations when an error occurs.ExtendedClosedChannelException -
Annotation Types Summary Annotation Type Description ChannelHandler.Sharable Indicates that the same instance of the annotatedChannelHandlercan be added to one or moreChannelPipelines multiple times without a race condition.ChannelHandlerMask.Skip Indicates that the annotated event handler method inChannelHandlerwill not be invoked byChannelPipelineand so MUST only be used when theChannelHandlermethod does nothing except forward to the nextChannelHandlerin the pipeline.