package com.manning.nettyinaction.chapter6; import io.netty.channel.ChannelHandler; import io.netty.channel.ChannelHandlerContext; import io.netty.channel.ChannelInboundHandlerAdapter; import io.netty.util.ReferenceCountUtil; /** * * Listing 6.1 of <i>Netty in Action</i> * * @author <a href="mailto:norman.maurer@googlemail.com">Norman Maurer</a> */ @ChannelHandler.Sharable public class DiscardHandler extends ChannelInboundHandlerAdapter { @Override public void channelRead(ChannelHandlerContext ctx, Object msg) { ReferenceCountUtil.release(msg); } }