Skip to content

Instantly share code, notes, and snippets.

@zeroFruit
Created July 23, 2022 00:28
Show Gist options
  • Save zeroFruit/e22bf52c4f6dbe7a1d6513bf111d5f7e to your computer and use it in GitHub Desktop.
Save zeroFruit/e22bf52c4f6dbe7a1d6513bf111d5f7e to your computer and use it in GitHub Desktop.
Channel concept & implementation— el Project (2)
/**
* {@link ChannelHandler} which adds callbacks for state changes. This allows the user to hook in to
* state changes easily.
*/
public interface ChannelInboundHandler extends ChannelHandler {
/**
* Called when {@link Channel} of the {@link ChannelHandlerContext} was registered with its {@link
* ChannelEventLoop}
*/
void channelRegistered(ChannelHandlerContext ctx) throws Exception;
/** Gets called if a {@link Throwable} was thrown. */
void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment