Class SimpleClientInitializer

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

    public class SimpleClientInitializer
    extends io.netty.channel.ChannelInitializer<io.netty.channel.socket.SocketChannel>
    Initializes secured SimpleClient pipeline.
    Author:
    michal.polkorab
    • Nested Class Summary

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

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

      Constructors 
      Constructor Description
      SimpleClientInitializer​(com.google.common.util.concurrent.SettableFuture<Boolean> isOnlineFuture, boolean secured)
      Constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void initChannel​(io.netty.channel.socket.SocketChannel ch)  
      void setScenario​(ScenarioHandler handler)
      Sets the ScenarioHandler.
      • Methods inherited from class io.netty.channel.ChannelInitializer

        channelRegistered, exceptionCaught, handlerAdded, handlerRemoved
      • Methods inherited from class io.netty.channel.ChannelInboundHandlerAdapter

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

        ensureNotSharable, isSharable
    • Constructor Detail

      • SimpleClientInitializer

        public SimpleClientInitializer​(com.google.common.util.concurrent.SettableFuture<Boolean> isOnlineFuture,
                                       boolean secured)
        Constructor.
        Parameters:
        isOnlineFuture - future notifier of connected channel
        secured - true if SimpleClient should use encrypted communication
    • Method Detail

      • initChannel

        public void initChannel​(io.netty.channel.socket.SocketChannel ch)
        Specified by:
        initChannel in class io.netty.channel.ChannelInitializer<io.netty.channel.socket.SocketChannel>
      • setScenario

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