This topic has not yet been written. The content below is from the topic description.
For example, you can define what to do when a data is read from a socket: public class MyReadHandler implements SimpleChannelHandler { public void messageReceived(ChannelHandlerContext ctx, MessageEvent evt) { Object message = evt.getMessage(); // Do something with the received message. ... // And forward the event to the next handler. ctx.sendUpstream(evt); } } You can also define what to do when other handler requested a write operation: public class MyWriteHandler implements SimpleChannelHandler { public void writeRequested(ChannelHandlerContext ctx, MessageEvent evt) { Object message = evt.getMessage(); // Do something with the message to be written. ... // And forward the event to the next handler. ctx.sendDownstream(evt); } } For more information about the event model, please refer to the API documentation of ChannelEvent and ChannelPipeline.