Class NettyConnection.ValidatorHandler

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

    private class NettyConnection.ValidatorHandler
    extends io.netty.channel.ChannelInboundHandlerAdapter
    Schedules a connection validator to run based on its strategy. If the validator fails an exception caught is fired in the pipeline.
    • Nested Class Summary

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

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

      Fields 
      Modifier and Type Field Description
      private ConnectionValidator connectionValidator
      Connection validator.
      private io.netty.util.concurrent.ScheduledFuture<?> sf
      Future to track execution status.
    • Method Summary

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

        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

      • connectionValidator

        private final ConnectionValidator connectionValidator
        Connection validator.
      • sf

        private io.netty.util.concurrent.ScheduledFuture<?> sf
        Future to track execution status.
    • Constructor Detail

      • ValidatorHandler

        ValidatorHandler​(ConnectionValidator validator)
        Creates a new validator handler.
        Parameters:
        validator - to execute
    • Method Detail

      • channelActive

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

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