Channel implementation.
| Modifier and Type | Class and Description |
|---|---|
| protected abstract class | AbstractChannel.
|
| private static class | |
| private static class | |
| private static class | |
| pack-priv static class |
| Modifier and Type | Field and Description |
|---|---|
| private final AbstractChannel. | |
| private boolean | |
| private volatile EventLoop | |
| private final ChannelId | |
| private Throwable | |
| private volatile SocketAddress | |
| private static final InternalLogger | |
| private final Channel | |
| private final DefaultChannelPipeline | |
| private volatile boolean | |
| private volatile SocketAddress | |
| private String | |
| private boolean | strValActive
Cache for the string representation of this channel |
| private final Channel. | |
| private final VoidChannelPromise |
| Access | Constructor and Description |
|---|---|
| protected | AbstractChannel(Channel
the parent of this channel. parent)null if there's no parent.Creates a new instance. |
| protected | AbstractChannel(Channel
the parent of this channel. parent, ChannelId id)null if there's no parent.Creates a new instance. |
| Modifier and Type | Method and Description |
|---|---|
| public ByteBufAllocator | alloc()
Implements io. ByteBufAllocator which will be used to allocate ByteBufs.
|
| public ChannelFuture | bind(SocketAddress localAddress)
Implements io. SocketAddress and notify the ChannelFuture once the operation
completes, either because the operation was successful or because of an error.
|
| public ChannelFuture | bind(SocketAddress localAddress, ChannelPromise promise)
Implements io. SocketAddress and notify the ChannelFuture once the operation
completes, either because the operation was successful or because of an error.
|
| public long | bytesBeforeUnwritable()
Implements io. isWritable() returns false.
|
| public long | bytesBeforeWritable()
Implements io. isWritable() returns true.
|
| public ChannelFuture | close()
Implements io. Channel and notify the ChannelFuture once the operation completes,
either because the operation was successful or because of
an error.
|
| public ChannelFuture | close(ChannelPromise promise)
Implements io. Channel and notify the ChannelFuture once the operation completes,
either because the operation was successful or because of
an error.
|
| public ChannelFuture | closeFuture()
Implements io. ChannelFuture which will be notified when this
channel is closed.
|
| public final int | compareTo(Channel
the object to be compared. o)Implements java. |
| public ChannelFuture | connect(SocketAddress remoteAddress)
Implements io. SocketAddress and notify the ChannelFuture once the operation
completes, either because the operation was successful or because of an error.
|
| public ChannelFuture | connect(SocketAddress remoteAddress, SocketAddress localAddress)
Implements io. SocketAddress while bind to the localAddress and notify the
ChannelFuture once the operation completes, either because the operation was successful or because of
an error.
|
| public ChannelFuture | connect(SocketAddress remoteAddress, ChannelPromise promise)
Implements io. SocketAddress and notify the ChannelFuture once the operation
completes, either because the operation was successful or because of an error.
|
| public ChannelFuture | connect(SocketAddress remoteAddress, SocketAddress localAddress, ChannelPromise promise)
Implements io. SocketAddress while bind to the localAddress and notify the
ChannelFuture once the operation completes, either because the operation was successful or because of
an error.
|
| public ChannelFuture | deregister()
Implements io. EventExecutor and notify the
ChannelFuture once the operation completes, either because the operation was successful or because of
an error.
|
| public ChannelFuture | deregister(ChannelPromise promise)
Implements io. EventExecutor and notify the
ChannelFuture once the operation completes, either because the operation was successful or because of
an error.
|
| public ChannelFuture | disconnect()
Implements io. ChannelFuture once the operation completes,
either because the operation was successful or because of an error.
|
| public ChannelFuture | disconnect(ChannelPromise promise)
Implements io. ChannelFuture once the operation completes,
either because the operation was successful or because of an error.
|
| protected abstract void | |
| protected abstract void | |
| protected abstract void | |
| protected void | |
| protected abstract void | |
| protected void | doRegister()
Is called after the |
| protected void | |
| protected abstract void | |
| 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 EventLoop | eventLoop()
Implements io. EventLoop this Channel was registered to.
|
| protected Object | filterOutboundMessage(Object msg)
Invoked when a new message is added to a |
| public Channel | flush()
Implements io. |
| public final int | |
| public final ChannelId | |
| protected void | |
| protected void | |
| protected abstract boolean | |
| public boolean | isRegistered()
Implements io. true if the Channel is registered with an EventLoop.
|
| public boolean | isWritable()
Implements io. true if and only if the I/O thread will perform the
requested write operation immediately.
|
| public SocketAddress | localAddress()
Implements io. |
| protected abstract SocketAddress | |
| protected final int | |
| protected DefaultChannelPipeline | |
| public ChannelFuture | newFailedFuture(Throwable cause)
Implements io. ChannelFuture which is marked as failed already.
|
| protected ChannelId | |
| public ChannelProgressivePromise | newProgressivePromise()
Implements io. ChannelProgressivePromise
|
| public ChannelPromise | newPromise()
Implements io. ChannelPromise.
|
| public ChannelFuture | newSucceededFuture()
Implements io. ChannelFuture which is marked as succeeded already.
|
| protected abstract AbstractChannel. | |
| public Channel | |
| public ChannelPipeline | |
| public Channel | read()
Implements io. Channel into the first inbound buffer, triggers an
ChannelInboundHandler#channelRead(ChannelHandlerContext, Object) event if data was
read, and triggers a
channelReadComplete event so the
handler can decide to continue reading.
|
| public SocketAddress | remoteAddress()
Implements io. |
| protected abstract SocketAddress | |
| public String | |
| public Channel. | unsafe()
Implements io. |
| protected void | |
| public final ChannelPromise | voidPromise()
Implements io. |
| public ChannelFuture | write(Object msg)
Implements io. ChannelHandlerContext through the ChannelPipeline.
|
| public ChannelFuture | write(Object msg, ChannelPromise promise)
Implements io. ChannelHandlerContext through the ChannelPipeline.
|
| public ChannelFuture | writeAndFlush(Object msg)
Implements io. write(Object) and flush().
|
| public ChannelFuture | writeAndFlush(Object msg, ChannelPromise promise)
Implements io. write(Object, ChannelPromise) and flush().
|