Class SimpleClientHandler

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

    public class SimpleClientHandler
    extends io.netty.channel.ChannelInboundHandlerAdapter
    Simple client handler.
    Author:
    michal.polkorab
    • 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 channelActive​(io.netty.channel.ChannelHandlerContext ctx)  
      void channelRead​(io.netty.channel.ChannelHandlerContext ctx, Object msg)  
      void setScenario​(ScenarioHandler handler)
      Sets the ScenarioHandler.
      • Methods inherited from class io.netty.channel.ChannelInboundHandlerAdapter

        channelInactive, 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
    • Constructor Detail

      • SimpleClientHandler

        public SimpleClientHandler​(com.google.common.util.concurrent.SettableFuture<Boolean> isOnlineFuture,
                                   ScenarioHandler scenarioHandler)
        Constructor.
        Parameters:
        isOnlineFuture - future notifier of connected channel
        scenarioHandler - handler of scenario events
    • Method Detail

      • channelRead

        public void channelRead​(io.netty.channel.ChannelHandlerContext ctx,
                                Object msg)
        Specified by:
        channelRead in interface io.netty.channel.ChannelInboundHandler
        Overrides:
        channelRead in class io.netty.channel.ChannelInboundHandlerAdapter
      • 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
      • setScenario

        public void setScenario​(ScenarioHandler handler)
        Sets the ScenarioHandler.
        Parameters:
        handler - handler of scenario events