Channel implementation.
| Modifier and Type | Class and Description |
|---|---|
| private static class | |
| private static class | |
| private static class | |
| private static class | |
| protected static class | |
| protected class | AbstractChannel.
Sink that will be used by |
| protected class | AbstractChannel.
Sink that will be used by |
| Modifier and Type | Field and Description |
|---|---|
| private volatile boolean | |
| private volatile boolean | |
| private volatile int | |
| private static final AtomicIntegerFieldUpdater | |
| private volatile BufferAllocator | |
| private boolean | |
| private final AbstractChannel. | |
| private Promise | connectPromise
The future of the current connection attempt. |
| private Future | |
| private volatile int | |
| private volatile ReadBufferAllocator | |
| private static final int | |
| private static final MessageSizeEstimator | |
| private MessageSizeEstimator. | |
| private final EventLoop | |
| private final Runnable | |
| private final ChannelId | |
| private Throwable | |
| private boolean | |
| private boolean | |
| private volatile L | |
| private static final InternalLogger | |
| private volatile MessageSizeEstimator | |
| private boolean | |
| private boolean | neverRegistered
true if the channel has never been registered, false otherwise |
| private volatile ChannelOutboundBuffer | |
| private final P | |
| private final ChannelPipeline | |
| private ReadBufferAllocator | |
| private volatile ReadHandleFactory | |
| private AbstractChannel | |
| private volatile boolean | |
| private volatile R | |
| private R | |
| private String | |
| private boolean | strValActive
Cache for the string representation of this channel |
| private static final Set | |
| private final boolean | |
| private volatile int | |
| private static final AtomicIntegerFieldUpdater | |
| private volatile WriteBufferWaterMark | |
| private volatile WriteHandleFactory | |
| private AbstractChannel |
| Access | Constructor and Description |
|---|---|
| protected | AbstractChannel(P
the parent of this channel. parent, EventLoop null if there's no parent.the eventLoop, boolean EventLoop which will be used.true if and only if the channel has the disconnect()
operation that allows a user to disconnect and then call {Creates a new instance. |
| protected | AbstractChannel(P
the parent of this channel. parent, EventLoop null if there's no parent.the eventLoop, boolean EventLoop which will be used.true if and only if the channel has the disconnect()
operation that allows a user to disconnect and then call {the defaultReadHandleFactory, WriteHandleFactory ReadHandleFactory that is used by default.the defaultWriteHandleFactory)WriteHandleFactory that is used by default.Creates a new instance. |
| protected | AbstractChannel(P
the parent of this channel. parent, EventLoop null if there's no parent.the eventLoop, boolean EventLoop which will be used.true if and only if the channel has the disconnect()
operation that allows a user to disconnect and then call {the defaultReadHandleFactory, WriteHandleFactory ReadHandleFactory that is used by default.the defaultWriteHandleFactory, ChannelId WriteHandleFactory that is used by default.the id)ChannelId which will be used.Creates a new instance. |
| Modifier and Type | Method and Description |
|---|---|
| private static Throwable | annotateConnectException(Throwable cause, SocketAddress remoteAddress)
Appends the remote address to the message of the exceptions caused by connection attempt failure. |
| private void | |
| private void | |
| public final BufferAllocator | bufferAllocator()
Implements io. BufferAllocator which will be used to allocate Buffers.
|
| protected final void | |
| private void | |
| private void | |
| private void | |
| private void | closeAndUpdateWritability(ChannelOutboundBuffer outboundBuffer, Throwable cause, Throwable closeCause)
|
| public final Future | closeFuture()
Implements io. Future which will be notified when this
channel is closed.
|
| private void | |
| private void | closeNow(ChannelOutboundBuffer outboundBuffer, boolean wasActive, Promise<Void> promise, Throwable cause, ClosedChannelException closeCause)
|
| private void | |
| protected void | |
| private void | |
| public final int | compareTo(Channel
the object to be compared. o)Implements java. |
| private void | |
| private void | |
| private void | |
| private void | |
| private void | |
| protected abstract void | doBind(SocketAddress
the localAddress)SocketAddress to bound to.Bind the |
| protected void | |
| protected abstract void | |
| private void | |
| protected abstract boolean | Returns: true if the connect operation was completed, false if
finishConnect() will be called later again to try finish connecting.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.Connect to remote peer. |
| protected abstract void | |
| protected abstract boolean | Returns: true if the connect operations was completed,
false if finishConnect()
will be called later again to try finishing the connect operation.the remote address of the peer. requestedRemoteAddress)Finish a connect request. |
| protected abstract void | |
| protected abstract boolean | Returns: true if the channel should be shutdown / closed.the readSinkReadSink that should be called with messages that are read from the transport
to propagate these.Try to read a message from the transport and dispatch it via |
| protected abstract void | doShutdown(ChannelShutdownDirection
the direction to shut down. direction)Shutdown one direction of the |
| protected abstract void | doWriteNow(AbstractChannel<P, L, R>.
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.Called in a loop when writes should be performed until this method returns |
| private boolean | |
| public final boolean | equals(Object
the reference object with which to compare. o)Overrides java. true if and only if the specified object is identical
with this channel (i.e: this == o).
|
| public final EventLoop | executor()
Implements io. EventLoop this Channel was registered to.
|
| protected Object | filterOutboundMessage(Object
the message to filter / convert. msg)Invoked when a new message is added to to the outbound queue of this |
| protected final boolean | Returns: true if the connect operation completed, false otherwise.Should be called once the connect request is ready to be completed and |
| private boolean | fireChannelActiveIfNotActiveBefore()
Calls |
| private void | |
| private void | |
| private void | |
| private void | |
| private void | |
| private BufferAllocator | |
| private int | |
| protected < the value type. T> T | Returns: the value for the option.the option)ChannelOption.Override to add support for more |
| private MessageSizeEstimator | |
| public final <T> T | getOption(ChannelOption<T>
the option)ChannelOption.Implements io. ChannelOption
|
| private <T extends ReadHandleFactory> T | |
| private WriteBufferWaterMark | |
| private <T extends WriteHandleFactory> T | |
| private void | |
| public final int | |
| public final ChannelId | id()
Implements io. Channel.
|
| private void | |
| private boolean | |
| private boolean | |
| private boolean | |
| protected final boolean | Returns: true if there is an outstanding connect request.Returns if a connect operation was issued before, and |
| protected boolean | Returns: true if supported, false otherwise.the option)ChannelOption.Override to add support for more |
| public final boolean | isOptionSupported(ChannelOption<?>
the option. option)Implements io. true if the given ChannelOption is supported by this Channel implementation.
|
| protected final boolean | Returns: if a read is pending.Returns |
| public final boolean | isRegistered()
Implements io. |
| protected final boolean | Returns: true if supported.Returns |
| protected boolean | isWriteFlushedScheduled()
Returns |
| public final L | localAddress()
Implements io. |
| protected abstract L | Returns: the local address if any,null otherwise.Returns the |
| protected ChannelPipeline | |
| private static ClosedChannelException | |
| protected static Set | Returns: theSet that holds all the options.the options. options)Creates a new |
| public final P | |
| public final ChannelPipeline | |
| protected Future | |
| protected BufferAllocator | readBufferAllocator()
Return the |
| protected final ReadHandleFactory. | |
| protected final void | |
| protected void | |
| protected final void | readNow()
Reading from the underlying transport now until there is nothing more to read or the
|
| private AbstractChannel | |
| private void | |
| private void | |
| public final R | remoteAddress()
Implements io. |
| protected abstract R | Returns: the remote address if any,null otherwise.Return the |
| private static void | |
| private static void | |
| private static void | |
| private void | |
| private void | |
| private void | |
| private void | |
| private void | |
| protected < the value type. T> void | setExtendedOption(ChannelOption<T>
the option, T value)ChannelOption.Override to add support for more |
| private void | |
| public final <T> Channel | setOption(ChannelOption<T>
the option, T ChannelOption.the value for the value)ChannelOptionImplements io. |
| private void | |
| private void | |
| private void | |
| private boolean | shutdownOutput(final Promise<Void> promise, Throwable
The cause which may provide rational for the shutdown. cause)Shutdown the output portion of the corresponding |
| protected final void | |
| private void | |
| private MessageSizeEstimator. | |
| private static Set | |
| public String | |
| private long | |
| private void | |
| protected static < the concreate type of the T extends EventLoopGroup> TEventLoopGroup. | Returns: the group itselfthe group to check against group, String the name of the param that is used when throwing an exception. name, Class<? extends Channel> the channelType)Channel type.Validate that the |
| protected static void | validateFileRegion(DefaultFileRegion
the region to validate. region, long the requested position position)Validate a |
| public final long | writableBytes()
Implements io. Channel becomes 'unwritable'.
|
| protected final void | writeFlushed()
Writing previous flushed messages if |
| protected final void | |
| protected final WriteHandleFactory. | |
| protected void | writeLoopComplete(boolean
true if all messages were written during the write loop, false otherwise.Called once the write loop completed. |
| private AbstractChannel | |
| private void |