ChannelPipeline implementation. It is usually created
by a Channel implementation when the Channel is created.
| Modifier and Type | Class and Description |
|---|---|
| private static class | |
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| private final Channel | |
| pack-priv static final ReadBufferAllocator | |
| private static final AtomicReferenceFieldUpdater | |
| private volatile MessageSizeEstimator. | |
| private final List | |
| private final DefaultChannelHandlerContext | |
| private static final ChannelHandler | |
| private static final String | |
| private static final InternalLogger | |
| private static final FastThreadLocal | |
| private volatile long | |
| private final Future | |
| private final DefaultChannelHandlerContext | |
| private static final ChannelHandler | |
| private static final String | |
| private static final AtomicLongFieldUpdater | |
| private final boolean |
| 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.
|
| private 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.
|
| private 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 | |
| public final ChannelPipeline | addFirst(ChannelHandler...
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 | |
| public final ChannelPipeline | addLast(ChannelHandler...
the handlers to insert last handlers)Implements io. ChannelHandlers at the last position of this pipeline.
|
| private void | |
| public final Future | bind(SocketAddress localAddress)
Implements io. SocketAddress and notify the Future once the operation
completes, either because the operation was successful or because of an error.
|
| protected abstract void | bindTransport(SocketAddress localAddress, Promise<Void> promise)
Bind the |
| private void | |
| private void | |
| public final Channel | channel()
Implements io. Channel that this pipeline is attached to.
|
| private void | |
| private static void | |
| private static int | |
| public final Future | close()
Implements io. Channel and notify the Future once the operation completes,
either because the operation was successful or because of
an error.
|
| protected abstract void | closeTransport(Promise<Void> promise)
Close the transport and notify the |
| public final Future | connect(SocketAddress remoteAddress)
Implements io. SocketAddress and notify the Future once the operation
completes, either because the operation was successful or because of an error.
|
| public final Future | connect(SocketAddress remoteAddress, SocketAddress localAddress)
Implements io. SocketAddress while bind to the localAddress and notify the
Future once the operation completes, either because the operation was successful or because of
an error.
|
| protected abstract void | connectTransport(SocketAddress remoteAddress, SocketAddress localAddress, Promise<Void> promise)
Connect the transport with the given remote |
| 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.
|
| pack-priv final void | decrementPendingOutboundBytes(long
the number of bytes to remove. delta)Decrements the |
| private static DefaultChannelPipeline | |
| public final Future | deregister()
Implements io. EventExecutor and notify the
Future once the operation completes, either because the operation was successful or because of
an error.
|
| protected abstract void | deregisterTransport(Promise<Void> promise)
Deregister the transport of the |
| public final Future | disconnect()
Implements io. Future once the operation completes,
either because the operation was successful or because of an error.
|
| protected abstract void | disconnectTransport(Promise<Void> promise)
Disconnect the transport and notify the |
| pack-priv final MessageSizeEstimator. | |
| public final EventExecutor | executor()
Implements io. EventExecutor that is used to execute the operations of this ChannelOutboundInvoker.
|
| private DefaultChannelHandlerContext | |
| private int | |
| public final ChannelPipeline | fireChannelActive()
Implements io. Channel is active now, which means it is connected.
|
| public final ChannelPipeline | fireChannelExceptionCaught(Throwable cause)
Implements io. Channel received an Throwable in one of its inbound operations.
|
| public final ChannelPipeline | fireChannelInactive()
Implements io. Channel is inactive now, which means it is closed.
|
| public final ChannelPipeline | fireChannelInboundEvent(Object event)
Implements io. Channel received a custom defined inbound event.
|
| public final ChannelPipeline | fireChannelRead(Object msg)
Implements io. Channel received a message.
|
| public final ChannelPipeline | fireChannelReadComplete()
Implements io. ChannelHandler#channelReadComplete(ChannelHandlerContext)
event to the next ChannelHandler in the ChannelPipeline.
|
| public final ChannelPipeline | fireChannelRegistered()
Implements io. Channel was registered to its EventLoop.
|
| public final ChannelPipeline | fireChannelShutdown(ChannelShutdownDirection direction)
Implements io. Channel was shutdown in a specific direction.
|
| public final ChannelPipeline | fireChannelUnregistered()
Implements io. Channel was unregistered from its EventLoop.
|
| public final ChannelPipeline | fireChannelWritabilityChanged()
Implements io. ChannelHandler#channelWritabilityChanged(ChannelHandlerContext)
event to the next ChannelHandler in the ChannelPipeline.
|
| public ChannelHandler | first()
Overrides default io. ChannelHandler in this pipeline.
|
| public ChannelHandlerContext | firstContext()
Implements io. ChannelHandler in this pipeline.
|
| public final ChannelPipeline | flush()
Implements io. |
| protected abstract void | flushTransport()
Flush out all (previous) scheduled write operations, scheduled via |
| pack-priv final void | |
| 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.
|
| pack-priv final void | incrementPendingOutboundBytes(long
the number of bytes to add. delta)Increments the |
| protected abstract boolean | Returns: true if disconnecting is supported by the transport.Returns |
| public Iterator | |
| public ChannelHandler | last()
Overrides default io. ChannelHandler in this pipeline.
|
| public ChannelHandlerContext | lastContext()
Implements io. ChannelHandler in this pipeline.
|
| public final List | names()
Overrides default io. List of the handler names.
|
| private DefaultChannelHandlerContext | |
| public final <V> Future | newFailedFuture(Throwable cause)
Overrides default io. Future which is marked as failed already.
|
| public final <V> Promise | newPromise()
Overrides default io. Promise.
|
| public final Future | newSucceededFuture()
Overrides default io. Future which is marked as succeeded already.
|
| public final <V> Future | newSucceededFuture(V value)
Overrides default io. Future which is marked as succeeded already.
|
| protected void | onUnhandledChannelInboundEvent(Object evt)
Called once an user event hit the end of the |
| 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 | onUnhandledInboundChannelShutdown(ChannelShutdownDirection direction)
Called once the |
| protected void | onUnhandledInboundException(Throwable cause)
Called once a |
| protected void | onUnhandledInboundMessage(ChannelHandlerContext ctx, Object msg)
Called once a message hit the end of the |
| public final long | pendingOutboundBytes()
Implements io. ChannelPipeline.
|
| protected abstract void | pendingOutboundBytesUpdated(long
the new pendingOutboundBytes)pendingOutboundBytes().Called once the |
| public final ChannelPipeline | |
| public final ChannelPipeline | read(ReadBufferAllocator
The readBufferAllocator)ReadBufferAllocator that should be used to allocate a Buffer
if needed (for reading the data).Implements io. Channel, triggers an
ChannelHandler#channelRead(ChannelHandlerContext, Object) event if data was
read, and triggers a
channelReadComplete event so the
handler can decide to continue reading.
|
| protected abstract void | readTransport(ReadBufferAllocator readBufferAllocator)
Schedules a read operation on the transport that fills the inbound buffer of the first |
| public final Future | register()
Implements io. EventExecutor for I/O processing.
|
| protected abstract void | registerTransport(Promise<Void> promise)
Register the transport and notify the |
| public final ChannelPipeline | remove(ChannelHandler
the handler)ChannelHandler to removeOverrides default io. ChannelHandler from this pipeline.
|
| public final ChannelHandler | remove(String
the name under which the name)ChannelHandler was stored.Overrides default io. ChannelHandler with the specified name from this pipeline.
|
| public final <T extends ChannelHandler> T | remove(Class<T>
the type of the handler handlerType)Overrides default io. ChannelHandler of the specified type from this pipeline.
|
| private void | |
| public ChannelHandler | removeFirst()
Implements io. ChannelHandler in this pipeline.
|
| public final <T extends ChannelHandler> T | removeIfExists(String
the name under which the name)ChannelHandler was stored.Implements io. ChannelHandler with the specified name from this pipeline if it exists.
|
| public final <T extends ChannelHandler> T | removeIfExists(Class<T>
the type of the handler handlerType)Implements io. ChannelHandler of the specified type from this pipeline if it exists.
|
| public final <T extends ChannelHandler> T | removeIfExists(ChannelHandler
the handler)ChannelHandler to removeImplements io. ChannelHandler from this pipeline if it exists
|
| private <T extends ChannelHandler> T | |
| public 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 | replace(Predicate<DefaultChannelHandlerContext> predicate, String newName, ChannelHandler newHandler)
|
| private void | |
| private <T extends ChannelHandler> T | |
| public final Future | sendOutboundEvent(Object event)
Implements io. ChannelOutboundInvoker through the
ChannelPipeline.
|
| protected abstract void | sendOutboundEventTransport(Object event, Promise<Void> promise)
Send a custom outbound event on the transport. |
| public Future | shutdown(ChannelShutdownDirection direction)
Implements io. Channel and notify the Future once the operation completes,
either because the operation was successful or because of an error.
|
| protected abstract void | shutdownTransport(ChannelShutdownDirection direction, Promise<Void> promise)
Shutdown the given direction of the transport and notify the |
| public Map | toMap()
Implements io. Map whose keys are
handler names and whose values are handlers.
|
| public final String | |
| pack-priv final Object | |
| protected abstract EventExecutor | Returns: executor.Returns the |
| public final Future | write(Object msg)
Implements io. ChannelHandlerContext through the ChannelPipeline.
|
| public final Future | writeAndFlush(Object msg)
Implements io. write(Object) and flush().
|
| protected abstract void |