Class InactiveChannelHandler

  • All Implemented Interfaces:
    io.netty.channel.ChannelHandler, io.netty.channel.ChannelInboundHandler

    @Sharable
    public class InactiveChannelHandler
    extends io.netty.channel.ChannelInboundHandlerAdapter
    Handler used to detect if the channel has become inactive and throw an error in certain scenarios.
    • Nested Class Summary

      • Nested classes/interfaces inherited from interface io.netty.channel.ChannelHandler

        io.netty.channel.ChannelHandler.Sharable
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void channelInactive​(io.netty.channel.ChannelHandlerContext ctx)  
      • Methods inherited from class io.netty.channel.ChannelInboundHandlerAdapter

        channelActive, channelRead, channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged, exceptionCaught, userEventTriggered
      • Methods inherited from class io.netty.channel.ChannelHandlerAdapter

        ensureNotSharable, handlerAdded, handlerRemoved, isSharable
      • Methods inherited from interface io.netty.channel.ChannelHandler

        handlerAdded, handlerRemoved
    • Field Detail

      • BYTES_READ

        public static final io.netty.util.AttributeKey<Integer> BYTES_READ
      • REQUEST_SENT

        public static final io.netty.util.AttributeKey<Boolean> REQUEST_SENT
    • Constructor Detail

      • InactiveChannelHandler

        public InactiveChannelHandler()
    • Method Detail

      • channelInactive

        public void channelInactive​(io.netty.channel.ChannelHandlerContext ctx)
                             throws Exception
        Specified by:
        channelInactive in interface io.netty.channel.ChannelInboundHandler
        Overrides:
        channelInactive in class io.netty.channel.ChannelInboundHandlerAdapter
        Throws:
        Exception