序号 |
接口 |
注释 |
1, |
RecvByteBufAllocator.Handle recvBufAllocHandle(); |
Return the assigned {@link RecvByteBufAllocator.Handle} which will be used to allocate {@link ByteBuf}'s when receiving data. |
2, |
ChannelHandlerInvoker invoker(); |
Returns the {@link ChannelHandlerInvoker} which is used by default unless specified by a user.
|
3, |
SocketAddress localAddress(); |
Return the {@link SocketAddress} to which is bound local or {@code null} if none.
|
4, |
SocketAddress remoteAddress(); |
Return the {@link SocketAddress} to which is bound remote or {@code null} if none is bound yet. |
5, |
void register(EventLoop eventLoop, ChannelPromise promise); |
Register the {@link Channel} of the {@link ChannelPromise} and notify the {@link ChannelFuture} once the registration was complete. It's only safe to submit a new task to the {@link EventLoop} from within a {@link ChannelHandler} once the {@link ChannelPromise} succeeded. Otherwise the task may or may not be rejected. |
6, |
void bind(SocketAddress localAddress, ChannelPromise promise); |
Bind the {@link SocketAddress} to the {@link Channel} of the {@link ChannelPromise} and notify it once its done. |
7, |
void connect(SocketAddress remoteAddress, SocketAddress localAddress, ChannelPromise promise); |
Connect the {@link Channel} of the given {@link ChannelFuture} with the given remote {@link SocketAddress}.
If a specific local {@link SocketAddress} should be used it need to be given as argument. Otherwise just pass {@code null} to it.
The {@link ChannelPromise} will get notified once the connect operation was complete. |
8, |
void disconnect(ChannelPromise promise); |
Disconnect the {@link Channel} of the {@link ChannelFuture} and notify the {@link ChannelPromise} once the operation was complete. |
9, |
void close(ChannelPromise promise); |
Close the {@link Channel} of the {@link ChannelPromise} and notify the {@link ChannelPromise} once the operation was complete. |
10, |
void closeForcibly(); |
Closes the {@link Channel} immediately without firing any events. Probably only useful when registration attempt failed. |
11, |
void deregister(ChannelPromise promise); |
Deregister the {@link Channel} of the {@link ChannelPromise} from {@link EventLoop} and notify the {@link ChannelPromise} once the operation was complete. |
12, |
void beginRead(); |
Schedules a read operation that fills the inbound buffer of the first {@link ChannelHandler} in the {@link ChannelPipeline}. If there's already a pending read operation, this method does nothing. |
13, |
void write(Object msg, ChannelPromise promise); |
Schedules a write operation. |
14, |
void flush(); |
Flush out all write operations scheduled via {@link #write(Object, ChannelPromise)}. |
15, |
ChannelPromise voidPromise(); |
Return a special ChannelPromise which can be reused and passed to the operations in {@link Unsafe}. It will never be notified of a success or error and so is only a placeholder for operations that take a {@link ChannelPromise} as argument but for which you not want to get notified.
|
16, |
ChannelOutboundBuffer outboundBuffer(); |
Returns the {@link ChannelOutboundBuffer} of the {@link Channel} where the pending write requests are stored. |