Channel implementations that are used in an embedded fashion.
| Modifier and Type | Class and Description |
|---|---|
| private class | |
| private class | |
| private static enum |
| Modifier and Type | Field and Description |
|---|---|
| private final ChannelConfig | |
| private static final ChannelHandler[] | |
| private Queue | |
| private Throwable | |
| private static final SocketAddress | |
| private static final InternalLogger | |
| private final EmbeddedEventLoop | |
| private final ChannelMetadata | |
| private static final ChannelMetadata | |
| private static final ChannelMetadata | |
| private Queue | |
| private final ChannelFutureListener | |
| 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 added to 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 added to 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 added to 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 added to 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 added to 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 added to 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, final ChannelConfig ChannelId that will be used to identify this channelthe config, final ChannelHandler... ChannelConfig which will be returned by config().the handlers)ChannelHandlers which will be added to 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. |
| private ChannelFuture | |
| public void | |
| private boolean | |
| public final ChannelFuture | close()
Overrides io. 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)
Overrides io. Implements io. Channel and notify the ChannelFuture once the operation completes,
either because the operation was successful or because of
an error.
|
| public ChannelConfig | |
| public final ChannelFuture | disconnect()
Overrides io. Implements io. ChannelFuture once the operation completes,
either because the operation was successful or because of an error.
|
| public final ChannelFuture | disconnect(ChannelPromise promise)
Overrides io. Implements io. ChannelFuture once the operation completes,
either because the operation was successful or because of an error.
|
| protected void | doBeginRead()
Implements abstract io. |
| protected void | doBind(SocketAddress localAddress)
Implements abstract io. Channel to the SocketAddress
|
| protected void | |
| protected void | doDisconnect()
Implements abstract io. Channel from its remote peer
|
| protected void | doRegister()
Overrides io. Channel is registered with its EventLoop as part of the register process.
|
| protected void | doWrite(ChannelOutboundBuffer in)
Implements abstract io. |
| 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 ChannelFuture | |
| 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.
|
| protected boolean | isCompatible(EventLoop loop)
Implements abstract io. true if the given EventLoop is compatible with this instance.
|
| private static boolean | |
| public boolean | isOpen()
Implements io. true if the Channel is open and may get active later
|
| public Queue | |
| public Queue | |
| protected SocketAddress | localAddress0()
Implements abstract io. SocketAddress which is bound locally.
|
| private static ChannelMetadata | |
| public ChannelMetadata | metadata()
Implements io. ChannelMetadata of the Channel which describe the nature of the Channel.
|
| protected final DefaultChannelPipeline | newChannelPipeline()
Overrides io. DefaultChannelPipeline instance.
|
| protected AbstractChannel. | newUnsafe()
Implements abstract io. AbstractUnsafe instance which will be used for the life-time of the Channel
|
| public Queue | |
| private static Object | |
| public <T> T | |
| public <T> T | |
| private void | |
| private void | |
| public void | |
| 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 |
| private void | |
| public void | |
| public Channel. | unsafe()
Overrides io. Implements io. |
| 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 ChannelFuture | |
| public ChannelFuture | writeOneInbound(Object msg, ChannelPromise promise)
Writes one message to the inbound of this |
| public ChannelFuture | writeOneOutbound(Object msg)
Writes one message to the outbound of this |
| public ChannelFuture | writeOneOutbound(Object msg, ChannelPromise promise)
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 |