Skip to content

Instantly share code, notes, and snippets.

@zeroFruit
Created July 23, 2022 00:23
Show Gist options
  • Save zeroFruit/5552f3548e9cdb48afc2f1232c752e5d to your computer and use it in GitHub Desktop.
Save zeroFruit/5552f3548e9cdb48afc2f1232c752e5d to your computer and use it in GitHub Desktop.
Channel concept & implementation— el Project (2)
public interface ChannelPipeline
extends ChannelInboundInvoker, ChannelOutboundInvoker, Iterable<Entry<String, ChannelHandler>> {
/** Add handlers to its handler chain at the end. */
ChannelPipeline addLast(ChannelHandler... handlers);
/** Remove handler */
ChannelPipeline remove(ChannelHandler handler);
/** Returns channel it binds to. */
Channel channel();
/** Returns first handler context */
ChannelHandlerContext firstContext();
/** Returns the context of the handler */
ChannelHandlerContext context(ChannelHandler handler);
/**
* A {@link Channel} was registered to its {@link ChannelEventLoop}.
*
* <p>This will result in having the {@link
* ChannelInboundHandler#channelRegistered(ChannelHandlerContext)} method called of the next
* {@link ChannelInboundHandler} contained in the {@link ChannelPipeline} of the {@link Channel}.
*/
@Override
ChannelPipeline fireChannelRegistered();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment