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 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.IoEvent IoEventLoop IoEventLoopGroup EventLoopGroupforIoEventLoops.IoHandle A handle that can be registered to anIoHandler.IoHandler Handles IO dispatching for anThreadAwareExecutor.IoHandlerContext The context for anIoHandlerthat is run by anThreadAwareExecutor.IoHandlerFactory Factory forIoHandlerinstances.IoOps An IO op that can be submitted to anIoRegistrationviaIoRegistration.submit(IoOps). // * These submittedIoOpswill result inIoEvents on the relatedIoHandle.IoRegistration A registration for IO.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.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.ChannelHandlerAdapter Skeleton implementation of aChannelHandler.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.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 Deprecated. usePromiseNotifier.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> DefaultAddressedEnvelope<M,A extends java.net.SocketAddress> The defaultAddressedEnvelopeimplementation.DefaultChannelConfig The defaultChannelConfigimplementation.DefaultChannelId The defaultChannelIdimplementation.DefaultChannelPipeline The defaultChannelPipelineimplementation.DefaultChannelProgressivePromise The defaultChannelProgressivePromiseimplementation.DefaultChannelPromise The defaultChannelPromiseimplementation.DefaultEventLoop DefaultEventLoopGroup Deprecated. 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.DefaultSelectStrategyFactory Factory which uses the default select strategy.DelegatingChannelPromiseNotifier FixedRecvByteBufAllocator TheRecvByteBufAllocatorthat always yields the same buffer size prediction.ManualIoEventLoop IoEventLoopimplementation that is owned by the user and so needs to be driven by the user manually with the givenThread.MultithreadEventLoopGroup Abstract base class forEventLoopGroupimplementations that handles their tasks with multiple threads at the same time.MultiThreadIoEventLoopGroup IoEventLoopGroupimplementation that will handle its tasks with multiple threads.PendingWriteQueue A queue of write operations which are pending for later execution.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.ServerChannelRecvByteBufAllocator MaxMessagesRecvByteBufAllocatorimplementation which should be used forServerChannels.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.SingleThreadEventLoop.ChannelsReadOnlyIterator<T extends Channel> SingleThreadIoEventLoop IoEventLoopimplementation 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 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. -
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.