ChannelPipeline implementation. It is usually created
by a Channel implementation when the Channel is created.
| Modifier and Type | Class and Description |
|---|---|
| pack-priv class | |
| private class | |
| private abstract static class | |
| private class | |
| pack-priv class |
| Modifier and Type | Field and Description |
|---|---|
| private final Channel | |
| private Map | |
| private static final AtomicReferenceFieldUpdater | |
| private volatile MessageSizeEstimator. | |
| private boolean | |
| pack-priv final DefaultChannelPipeline. | |
| private static final String | |
| pack-priv static final InternalLogger | |
| private static final FastThreadLocal | |
| private DefaultChannelPipeline. | pendingHandlerCallbackHead
This is the head of a linked list that is processed by |
| private boolean | registered
Set to |
| private final ChannelFuture | |
| pack-priv final DefaultChannelPipeline. | |
| private static final String | |
| private final boolean | |
| private final VoidChannelPromise |
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description |
|---|---|
| public final ChannelPipeline | addAfter(String
the name of the existing handler baseName, String the name of the handler to insert after name, ChannelHandler the handler to insert after handler)Implements io. ChannelHandler after an existing handler of this
pipeline.
|
| public final ChannelPipeline | addAfter(EventExecutorGroup
the group, String EventExecutorGroup which will be used to execute the ChannelHandler
methodsthe name of the existing handler baseName, String the name of the handler to insert after name, ChannelHandler the handler to insert after handler)Implements io. ChannelHandler after an existing handler of this
pipeline.
|
| private static void | |
| public final ChannelPipeline | addBefore(String
the name of the existing handler baseName, String the name of the handler to insert before name, ChannelHandler the handler to insert before handler)Implements io. ChannelHandler before an existing handler of this
pipeline.
|
| public final ChannelPipeline | addBefore(EventExecutorGroup
the group, String EventExecutorGroup which will be used to execute the ChannelHandler
methodsthe name of the existing handler baseName, String the name of the handler to insert before name, ChannelHandler the handler to insert before handler)Implements io. ChannelHandler before an existing handler of this
pipeline.
|
| private static void | |
| public final ChannelPipeline | addFirst(String
the name of the handler to insert first name, ChannelHandler the handler to insert first handler)Implements io. ChannelHandler at the first position of this pipeline.
|
| public final ChannelPipeline | addFirst(EventExecutorGroup
the group, String EventExecutorGroup which will be used to execute the ChannelHandler
methodsthe name of the handler to insert first name, ChannelHandler the handler to insert first handler)Implements io. ChannelHandler at the first position of this pipeline.
|
| public final ChannelPipeline | |
| public final ChannelPipeline | addFirst(ChannelHandler...
the handlers to insert first handlers)Implements io. ChannelHandlers at the first position of this pipeline.
|
| public final ChannelPipeline | addFirst(EventExecutorGroup
the executor, ChannelHandler... EventExecutorGroup which will be used to execute the ChannelHandlers
methods.the handlers to insert first handlers)Implements io. ChannelHandlers at the first position of this pipeline.
|
| private void | |
| public final ChannelPipeline | addLast(String
the name of the handler to append name, ChannelHandler the handler to append handler)Implements io. ChannelHandler at the last position of this pipeline.
|
| public final ChannelPipeline | addLast(EventExecutorGroup
the group, String EventExecutorGroup which will be used to execute the ChannelHandler
methodsthe name of the handler to append name, ChannelHandler the handler to append handler)Implements io. ChannelHandler at the last position of this pipeline.
|
| public final ChannelPipeline | |
| public final ChannelPipeline | addLast(ChannelHandler...
the handlers to insert last handlers)Implements io. ChannelHandlers at the last position of this pipeline.
|
| public final ChannelPipeline | addLast(EventExecutorGroup
the executor, ChannelHandler... EventExecutorGroup which will be used to execute the ChannelHandlers
methods.the handlers to insert last handlers)Implements io. ChannelHandlers at the last position of this pipeline.
|
| private void | |
| private synchronized void | atomicRemoveFromHandlerList(AbstractChannelHandlerContext ctx)
Method is synchronized to make the handler removal from the double linked list atomic. |
| public final ChannelFuture | bind(SocketAddress localAddress)
Implements io. SocketAddress and notify the ChannelFuture once the operation
completes, either because the operation was successful or because of an error.
|
| public final ChannelFuture | bind(SocketAddress localAddress, ChannelPromise promise)
Implements io. SocketAddress and notify the ChannelFuture once the operation
completes, either because the operation was successful or because of an error.
|
| private void | |
| private void | |
| private void | |
| private void | |
| private void | |
| public final Channel | channel()
Implements io. Channel that this pipeline is attached to.
|
| private void | |
| private static void | |
| private EventExecutor | |
| public final ChannelFuture | close()
Implements io. Channel and notify the ChannelFuture once the operation completes,
either because the operation was successful or because of
an error.
|
| public final ChannelFuture | close(ChannelPromise promise)
Implements io. Channel and notify the ChannelFuture once the operation completes,
either because the operation was successful or because of
an error.
|
| public final ChannelFuture | connect(SocketAddress remoteAddress)
Implements io. SocketAddress and notify the ChannelFuture once the operation
completes, either because the operation was successful or because of an error.
|
| public final ChannelFuture | connect(SocketAddress remoteAddress, SocketAddress localAddress)
Implements io. SocketAddress while bind to the localAddress and notify the
ChannelFuture once the operation completes, either because the operation was successful or because of
an error.
|
| public final ChannelFuture | connect(SocketAddress remoteAddress, ChannelPromise promise)
Implements io. SocketAddress and notify the ChannelFuture once the operation
completes, either because the operation was successful or because of an error.
|
| public final ChannelFuture | connect(SocketAddress remoteAddress, SocketAddress localAddress, ChannelPromise promise)
Implements io. SocketAddress while bind to the localAddress and notify the
ChannelFuture once the operation completes, either because the operation was successful or because of
an error.
|
| public final ChannelHandlerContext | context(String name)
Implements io. ChannelHandler with the
specified name in this pipeline.
|
| public final ChannelHandlerContext | context(ChannelHandler handler)
Implements io. ChannelHandler in
this pipeline.
|
| public final ChannelHandlerContext | context(Class<? extends ChannelHandler> handlerType)
Implements io. ChannelHandler of the
specified type in this pipeline.
|
| private AbstractChannelHandlerContext | |
| protected void | |
| public final ChannelFuture | deregister()
Implements io. EventExecutor and notify the
ChannelFuture once the operation completes, either because the operation was successful or because of
an error.
|
| public final ChannelFuture | deregister(final ChannelPromise promise)
Implements io. EventExecutor and notify the
ChannelFuture once the operation completes, either because the operation was successful or because of
an error.
|
| private synchronized void | destroy()
Removes all handlers from the pipeline one by one from tail (exclusive) to head (exclusive) to trigger handlerRemoved(). |
| private void | |
| private void | |
| public final ChannelFuture | disconnect()
Implements io. ChannelFuture once the operation completes,
either because the operation was successful or because of an error.
|
| public final ChannelFuture | disconnect(ChannelPromise promise)
Implements io. ChannelFuture once the operation completes,
either because the operation was successful or because of an error.
|
| pack-priv final MessageSizeEstimator. | |
| private String | |
| public final ChannelPipeline | fireChannelActive()
Implements io. Channel is active now, which means it is connected.
|
| public final ChannelPipeline | fireChannelInactive()
Implements io. Channel is inactive now, which means it is closed.
|
| public final ChannelPipeline | fireChannelRead(Object msg)
Implements io. Channel received a message.
|
| public final ChannelPipeline | fireChannelReadComplete()
Implements io. ChannelInboundHandler#channelReadComplete(ChannelHandlerContext)
event to the next ChannelInboundHandler in the ChannelPipeline.
|
| public final ChannelPipeline | fireChannelRegistered()
Implements io. Channel was registered to its EventLoop.
|
| public final ChannelPipeline | fireChannelUnregistered()
Implements io. Channel was unregistered from its EventLoop.
|
| public final ChannelPipeline | fireChannelWritabilityChanged()
Implements io. ChannelInboundHandler#channelWritabilityChanged(ChannelHandlerContext)
event to the next ChannelInboundHandler in the ChannelPipeline.
|
| public final ChannelPipeline | fireExceptionCaught(Throwable cause)
Implements io. Channel received an Throwable in one of its inbound operations.
|
| public final ChannelPipeline | fireUserEventTriggered(Object event)
Implements io. Channel received an user defined event.
|
| public final ChannelHandler | first()
Implements io. ChannelHandler in this pipeline.
|
| public final ChannelHandlerContext | firstContext()
Implements io. ChannelHandler in this pipeline.
|
| public final ChannelPipeline | flush()
Implements io. |
| private String | |
| private static String | |
| public final ChannelHandler | get(String name)
Implements io. ChannelHandler with the specified name in this
pipeline.
|
| public final <T extends ChannelHandler> T | get(Class<T> handlerType)
Implements io. ChannelHandler of the specified type in this
pipeline.
|
| private AbstractChannelHandlerContext | |
| private AbstractChannelHandlerContext | |
| private AbstractChannelHandlerContext | |
| protected void | |
| pack-priv final void | |
| public final Iterator | |
| public final ChannelHandler | last()
Implements io. ChannelHandler in this pipeline.
|
| public final ChannelHandlerContext | lastContext()
Implements io. ChannelHandler in this pipeline.
|
| public final List | |
| private AbstractChannelHandlerContext | |
| public final ChannelFuture | newFailedFuture(Throwable cause)
Implements io. ChannelFuture which is marked as failed already.
|
| public final ChannelProgressivePromise | newProgressivePromise()
Implements io. ChannelProgressivePromise
|
| public final ChannelPromise | newPromise()
Implements io. ChannelPromise.
|
| public final ChannelFuture | newSucceededFuture()
Implements io. ChannelFuture which is marked as succeeded already.
|
| protected void | onUnhandledChannelWritabilityChanged()
Called once the |
| protected void | onUnhandledInboundChannelActive()
Called once the |
| protected void | onUnhandledInboundChannelInactive()
Called once the |
| protected void | onUnhandledInboundChannelReadComplete()
Called once the |
| protected void | onUnhandledInboundException(Throwable cause)
Called once a |
| protected void | onUnhandledInboundMessage(Object msg)
Called once a message hit the end of the |
| protected void | onUnhandledInboundMessage(ChannelHandlerContext ctx, Object msg)
Called once a message hit the end of the |
| protected void | onUnhandledInboundUserEventTriggered(Object evt)
Called once an user event hit the end of the |
| public final ChannelPipeline | read()
Implements io. Channel into the first inbound buffer, triggers an
ChannelInboundHandler#channelRead(ChannelHandlerContext, Object) event if data was
read, and triggers a
channelReadComplete event so the
handler can decide to continue reading.
|
| public final ChannelPipeline | remove(ChannelHandler
the handler)ChannelHandler to removeImplements io. ChannelHandler from this pipeline.
|
| public final ChannelHandler | remove(String
the name under which the name)ChannelHandler was stored.Implements io. ChannelHandler with the specified name from this pipeline.
|
| public final <T extends ChannelHandler> T | remove(Class<T>
the type of the handler handlerType)Implements io. ChannelHandler of the specified type from this pipeline.
|
| private AbstractChannelHandlerContext | |
| public final ChannelHandler | removeFirst()
Implements io. ChannelHandler in this pipeline.
|
| public final <T extends ChannelHandler> T | |
| public final <T extends ChannelHandler> T | |
| public final <T extends ChannelHandler> T | |
| private <T extends ChannelHandler> T | |
| public final ChannelHandler | removeLast()
Implements io. ChannelHandler in this pipeline.
|
| public final ChannelPipeline | replace(ChannelHandler
the oldHandler, String ChannelHandler to be replacedthe name under which the replacement should be added newName, ChannelHandler the newHandler)ChannelHandler which is used as replacementImplements io. ChannelHandler with a new handler in this pipeline.
|
| public final ChannelHandler | replace(String
the name of the oldName, String ChannelHandler to be replacedthe name under which the replacement should be added newName, ChannelHandler the newHandler)ChannelHandler which is used as replacementImplements io. ChannelHandler of the specified name with a new handler in this pipeline.
|
| public final <T extends ChannelHandler> T | replace(Class<T>
the type of the handler to be removed oldHandlerType, String the name under which the replacement should be added newName, ChannelHandler the newHandler)ChannelHandler which is used as replacementImplements io. ChannelHandler of the specified type with a new handler in this pipeline.
|
| private ChannelHandler | |
| private static void | |
| public final Map | toMap()
Implements io. Map whose keys are
handler names and whose values are handlers.
|
| public final String | |
| pack-priv final Object | |
| public final ChannelPromise | voidPromise()
Implements io. |
| public final ChannelFuture | write(Object msg)
Implements io. ChannelHandlerContext through the ChannelPipeline.
|
| public final ChannelFuture | write(Object msg, ChannelPromise promise)
Implements io. ChannelHandlerContext through the ChannelPipeline.
|
| public final ChannelFuture | writeAndFlush(Object msg, ChannelPromise promise)
Implements io. write(Object, ChannelPromise) and flush().
|
| public final ChannelFuture | writeAndFlush(Object msg)
Implements io. write(Object) and flush().
|