Channel implementations that are used in an embedded fashion.
| Modifier and Type | Class and Description |
|---|---|
| private class | |
| private static enum |
| Modifier and Type | Field and Description |
|---|---|
| private static final ChannelHandler[] | |
| private Queue | |
| private boolean | |
| private Throwable | |
| private static final SocketAddress | |
| private static final InternalLogger | |
| private Queue | |
| private boolean | |
| private final FutureListener | |
| private static final SocketAddress | |
| private EmbeddedChannel. |
| Access | Constructor and Description |
|---|---|
| public | |
| public | EmbeddedChannel(ChannelId
the channelId)ChannelId that will be used to identify this channelCreate a new instance with the specified ID and an empty pipeline. |
| public | EmbeddedChannel(ChannelHandler...
the handlers)ChannelHandlers which will be add in the ChannelPipelineCreate a new instance with the pipeline initialized with the specified handlers. |
| public | EmbeddedChannel(boolean hasDisconnect, ChannelHandler...
the handlers)ChannelHandlers which will be add in the ChannelPipelineCreate a new instance with the pipeline initialized with the specified handlers. |
| public | EmbeddedChannel(boolean
true if this Channel is registered to the EventLoop in the
constructor. If false the user will need to call register().the handlers)ChannelHandlers which will be add in the ChannelPipelineCreate a new instance with the pipeline initialized with the specified handlers. |
| public | EmbeddedChannel(ChannelId
the channelId, ChannelHandler... ChannelId that will be used to identify this channelthe handlers)ChannelHandlers which will be add in the ChannelPipelineCreate a new instance with the channel ID set to the given ID and the pipeline initialized with the specified handlers. |
| public | EmbeddedChannel(ChannelId
the channelId, boolean hasDisconnect, ChannelHandler... ChannelId that will be used to identify this channelthe handlers)ChannelHandlers which will be add in the ChannelPipelineCreate a new instance with the channel ID set to the given ID and the pipeline initialized with the specified handlers. |
| public | EmbeddedChannel(ChannelId
the channelId, boolean ChannelId that will be used to identify this channeltrue if this Channel is registered to the EventLoop in the
constructor. If false the user will need to call register().the handlers)ChannelHandlers which will be add in the ChannelPipelineCreate a new instance with the channel ID set to the given ID and the pipeline initialized with the specified handlers. |
| public | EmbeddedChannel(Channel
the parent parent, ChannelId Channel of this EmbeddedChannel.the channelId, boolean ChannelId that will be used to identify this channeltrue if this Channel is registered to the EventLoop in the
constructor. If false the user will need to call register().the handlers)ChannelHandlers which will be add in the ChannelPipelineCreate a new instance with the channel ID set to the given ID and the pipeline initialized with the specified handlers. |
| Modifier and Type | Method and Description |
|---|---|
| public void | advanceTimeBy(long duration, TimeUnit unit)
Advance the clock of the event loop of this channel by the given duration. |
| public void | |
| private Future | |
| private boolean | |
| public final Future | close()
Overrides default io. Channel and notify the Future once the operation completes,
either because the operation was successful or because of
an error.
|
| public final Future | disconnect()
Overrides default io. Future once the operation completes,
either because the operation was successful or because of an error.
|
| protected void | doBind(SocketAddress
the localAddress)SocketAddress to bound to.Implements abstract io. Channel to the SocketAddress
|
| protected void | |
| protected boolean | doConnect(SocketAddress
the address of the remote peer. remoteAddress, SocketAddress the local address of this channel. localAddress, Buffer the initial data that is written during connect
(if initialData)ChannelOption#TCP_FASTOPEN_CONNECT is supported and configured).
If data is written care must be taken to update the
reader offset.Implements abstract io. |
| protected void | doDisconnect()
Implements abstract io. Channel from its remote peer
|
| protected boolean | doFinishConnect(SocketAddress
the remote address of the peer. requestedRemoteAddress)Implements abstract io. |
| protected void | doRead(boolean
true if a read was already pending when read()
was called.Implements abstract io. |
| protected boolean | doReadNow(AbstractChannel<Channel, SocketAddress, SocketAddress>.
the readSinkReadSink that should be called with messages that are read from the transport
to propagate these.Implements abstract io. ReadSink#processRead(int, int, Object).
|
| protected void | doShutdown(ChannelShutdownDirection
the direction to shut down. direction)Implements abstract io. Channel.
|
| protected void | doWriteNow(AbstractChannel<Channel, SocketAddress, SocketAddress>.
the writeSinkWriteSink that must be completed with the write
progress.
WriteSink#complete(long, long, int, boolean) or
WriteSink#complete(long, Throwable, boolean) must be called
exactly once before this method returns non-exceptional.Implements abstract io. false or there are
no more messages to write.
|
| private EmbeddedEventLoop | |
| protected final void | |
| public boolean | |
| private boolean | |
| public boolean | Returns: bufferReadable returnstrue if any of the used buffers has something left to readMark this |
| private void | |
| public EmbeddedChannel | |
| private void | |
| public EmbeddedChannel | |
| private void | |
| public void | |
| protected void | |
| protected void | |
| public boolean | Returns: true if there are any pending tasks, false otherwise.Check whether this channel has any pending tasks that would be executed by a call to |
| public Queue | |
| public boolean | isActive()
Implements io. true if the Channel is active and so connected.
|
| private static boolean | |
| public boolean | isOpen()
Implements io. true if the Channel is open and may get active later
|
| public boolean | isShutdown(ChannelShutdownDirection direction)
Implements io. true if the ChannelShutdownDirection of the Channel was shutdown before.
|
| protected SocketAddress | localAddress0()
Implements abstract io. SocketAddress which is bound locally.
|
| protected final DefaultChannelPipeline | newChannelPipeline()
Overrides io. ChannelPipeline instance.
|
| public Queue | |
| private static Object | |
| public <T> T | |
| public <T> T | |
| private void | |
| private void | |
| public Future | register()
Overrides default io. EventExecutor for I/O processing.
|
| private static boolean | |
| public boolean | releaseInbound()
Release all buffered inbound messages and return |
| public boolean | releaseOutbound()
Release all buffered outbound messages and return |
| protected SocketAddress | remoteAddress0()
Implements abstract io. SocketAddress which the Channel is connected to.
|
| public void | runPendingTasks()
Run all tasks (which also includes scheduled tasks) that are pending in the |
| public long | runScheduledPendingTasks()
Run all pending scheduled tasks in the |
| pack-priv void | |
| private void | |
| public void | |
| public boolean | Returns: true if the write operation did add something to the inbound bufferthe messages to be written msgs)Write messages to the inbound of this |
| public Future | |
| public Future | writeOneOutbound(Object msg)
Writes one message to the outbound of this |
| public boolean | Returns: bufferReadable returnstrue if the write operation did add something to the outbound bufferthe messages to be written msgs)Write messages to the outbound of this |