Class NettyConnection.AddRemoveHandler

  • All Implemented Interfaces:
    io.netty.channel.ChannelHandler
    Enclosing class:
    NettyConnection

    private static final class NettyConnection.AddRemoveHandler
    extends Object
    implements io.netty.channel.ChannelHandler
    Invokes a latch when this handler is added or removed from a pipeline.
    • Field Detail

      • handlerAddedLatch

        private final CountDownLatch handlerAddedLatch
        Latch to count down when this handler is added.
      • handlerRemovedLatch

        private final CountDownLatch handlerRemovedLatch
        Latch to count down when this handler is removed.
    • Method Detail

      • handlerAdded

        public void handlerAdded​(io.netty.channel.ChannelHandlerContext ctx)
                          throws Exception
        Specified by:
        handlerAdded in interface io.netty.channel.ChannelHandler
        Throws:
        Exception
      • handlerRemoved

        public void handlerRemoved​(io.netty.channel.ChannelHandlerContext ctx)
                            throws Exception
        Specified by:
        handlerRemoved in interface io.netty.channel.ChannelHandler
        Throws:
        Exception
      • exceptionCaught

        public void exceptionCaught​(io.netty.channel.ChannelHandlerContext ctx,
                                    Throwable cause)
                             throws Exception
        Specified by:
        exceptionCaught in interface io.netty.channel.ChannelHandler
        Throws:
        Exception