Channel implementations which use a Selector based approach.
| Modifier and Type | Class and Description |
|---|---|
| protected abstract class | |
| public static interface | AbstractNioChannel.
Special |
| Modifier and Type | Field and Description |
|---|---|
| private final SelectableChannel | |
| private final Runnable | |
| private ChannelPromise | connectPromise
The future of the current connection attempt. |
| private Future | |
| private static final InternalLogger | |
| protected final int | |
| pack-priv boolean | |
| private SocketAddress | |
| pack-priv volatile SelectionKey |
| Access | Constructor and Description |
|---|---|
| protected | AbstractNioChannel(Channel
the parent parent, SelectableChannel Channel by which this instance was created. May be nullthe underlying ch, int SelectableChannel on which it operatesthe ops to set to receive data from the readInterestOp)SelectableChannelCreate a new instance |
| Modifier and Type | Method and Description |
|---|---|
| protected final void | |
| private void | |
| protected void | doBeginRead()
Implements abstract io. |
| protected void | |
| protected abstract boolean | |
| protected void | doDeregister()
Overrides io. Channel from its EventLoop.
|
| protected abstract void | |
| protected void | doRegister()
Overrides io. Channel is registered with its EventLoop as part of the register process.
|
| public NioEventLoop | eventLoop()
Overrides io. Implements io. EventLoop this Channel was registered to.
|
| protected boolean | isCompatible(EventLoop loop)
Implements abstract io. true if the given EventLoop is compatible with this instance.
|
| public boolean | isOpen()
Implements io. true if the Channel is open and may get active later
|
| protected boolean | |
| protected SelectableChannel | |
| protected final ByteBuf | newDirectBuffer(ByteBuf buf)
Returns an off-heap copy of the specified |
| protected final ByteBuf | newDirectBuffer(ReferenceCounted holder, ByteBuf buf)
Returns an off-heap copy of the specified |
| protected SelectionKey | |
| protected void | setReadPending(final boolean readPending)
Deprecated
Use
clearReadPending() if appropriate instead.
No longer supported.
|
| private void | |
| public AbstractNioChannel. | unsafe()
Overrides io. Implements io. |
| ch | back to summary |
|---|---|
| private final SelectableChannel ch | |
| clearReadPendingRunnable | back to summary |
|---|---|
| private final Runnable clearReadPendingRunnable | |
| connectPromise | back to summary |
|---|---|
| private ChannelPromise connectPromise The future of the current connection attempt. If not null, subsequent connection attempts will fail. | |
| connectTimeoutFuture | back to summary |
|---|---|
| private Future<?> connectTimeoutFuture | |
| logger | back to summary |
|---|---|
| private static final InternalLogger logger | |
| readInterestOp | back to summary |
|---|---|
| protected final int readInterestOp | |
| readPending | back to summary |
|---|---|
| pack-priv boolean readPending | |
| requestedRemoteAddress | back to summary |
|---|---|
| private SocketAddress requestedRemoteAddress | |
| selectionKey | back to summary |
|---|---|
| pack-priv volatile SelectionKey selectionKey | |
| AbstractNioChannel | back to summary |
|---|---|
| protected AbstractNioChannel(Channel parent, SelectableChannel ch, int readInterestOp) Create a new instance
| |
| clearReadPending | back to summary |
|---|---|
| protected final void clearReadPending() Set read pending to | |
| clearReadPending0 | back to summary |
|---|---|
| private void clearReadPending0() | |
| doBeginRead | back to summary |
|---|---|
| protected void doBeginRead() throws Exception Implements abstract io. Doc from io. Schedule a read operation.
| |
| doClose | back to summary |
|---|---|
| protected void doClose() throws Exception Implements abstract io. Doc from io. Close the
| |
| doConnect | back to summary |
|---|---|
| protected abstract boolean doConnect(SocketAddress remoteAddress, SocketAddress localAddress) throws Exception Connect to the remote peer | |
| doDeregister | back to summary |
|---|---|
| protected void doDeregister() throws Exception Overrides io. Doc from io. Deregister the
| |
| doFinishConnect | back to summary |
|---|---|
| protected abstract void doFinishConnect() throws Exception Finish the connect | |
| doRegister | back to summary |
|---|---|
| protected void doRegister() throws Exception Overrides io. Doc from io. Is called after the
| |
| eventLoop | back to summary |
|---|---|
| public NioEventLoop eventLoop() Overrides io. Implements io. Doc from io. Return the
| |
| isCompatible | back to summary |
|---|---|
| protected boolean isCompatible(EventLoop loop) Implements abstract io. Doc from io. Return
| |
| isOpen | back to summary |
|---|---|
| public boolean isOpen() Implements io. Doc from io. Returns
| |
| isReadPending | back to summary |
|---|---|
| protected boolean isReadPending()
Deprecated No longer supported. No longer supported.
| |
| javaChannel | back to summary |
|---|---|
| protected SelectableChannel javaChannel() | |
| newDirectBuffer | back to summary |
|---|---|
| protected final ByteBuf newDirectBuffer(ByteBuf buf) Returns an off-heap copy of the specified | |
| newDirectBuffer | back to summary |
|---|---|
| protected final ByteBuf newDirectBuffer(ReferenceCounted holder, ByteBuf buf) Returns an off-heap copy of the specified | |
| selectionKey | back to summary |
|---|---|
| protected SelectionKey selectionKey() Return the current | |
| setReadPending | back to summary |
|---|---|
| protected void setReadPending(final boolean readPending)
Deprecated Use
| |
| setReadPending0 | back to summary |
|---|---|
| private void setReadPending0(boolean readPending) | |
| unsafe | back to summary |
|---|---|
| public AbstractNioChannel. Overrides io. Implements io. Doc from io. Returns an internal-use-only object that provides unsafe operations.
| |
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description |
|---|---|
| public final SelectableChannel | ch()
Implements io. SelectableChannel
|
| public final void | connect(final SocketAddress remoteAddress, final SocketAddress localAddress, final ChannelPromise promise)
Implements io. Channel of the given ChannelFuture with the given remote SocketAddress.
|
| public final void | finishConnect()
Implements io. |
| protected final void | |
| public final void | |
| private void | |
| private void | |
| private boolean | |
| protected final void |
| AbstractNioUnsafe | back to summary |
|---|---|
| protected AbstractNioUnsafe() | |
| ch | back to summary |
|---|---|
| public final SelectableChannel ch() Implements io. Doc from io. Return underlying
| |
| connect | back to summary |
|---|---|
| public final void connect(final SocketAddress remoteAddress, final SocketAddress localAddress, final ChannelPromise promise) Implements io. Doc from io. Connect the
| |
| finishConnect | back to summary |
|---|---|
| public final void finishConnect() Implements io. Doc from io. Finish connect
| |
| flush0 | back to summary |
|---|---|
| protected final void flush0() Overrides io.
| |
| forceFlush | back to summary |
|---|---|
| public final void forceFlush() Implements io.
| |
| fulfillConnectPromise | back to summary |
|---|---|
| private void fulfillConnectPromise(ChannelPromise promise, boolean wasActive) | |
| fulfillConnectPromise | back to summary |
|---|---|
| private void fulfillConnectPromise(ChannelPromise promise, Throwable cause) | |
| isFlushPending | back to summary |
|---|---|
| private boolean isFlushPending() | |
| removeReadOp | back to summary |
|---|---|
| protected final void removeReadOp() | |
Unsafe sub-type which allows to access the underlying SelectableChannel
| Modifier and Type | Method and Description |
|---|---|
| public SelectableChannel | |
| public void | |
| public void | |
| public void |
| ch | back to summary |
|---|---|
| public SelectableChannel ch() Return underlying | |
| finishConnect | back to summary |
|---|---|
| public void finishConnect() Finish connect | |
| forceFlush | back to summary |
|---|---|
| public void forceFlush() | |
| read | back to summary |
|---|---|
| public void read() Read from underlying | |