Class NettyChannelInitializer

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

    public final class NettyChannelInitializer
    extends io.netty.channel.ChannelInitializer<io.netty.channel.socket.SocketChannel>
    Pipeline factory to build a pipeline to use for netty transfer, every time a channel is initialized, the pipeline is filled with the handler provided by this class.
    Author:
    Grégory Van den Borre
    • 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
      protected void initChannel​(io.netty.channel.socket.SocketChannel ch)  
      • Methods inherited from class io.netty.channel.ChannelInitializer

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

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

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

        handlerRemoved
    • Constructor Detail

      • NettyChannelInitializer

        public NettyChannelInitializer​(HandlerFactory factory)
        Create a new instance and register the handlers.
        Parameters:
        factory - Create additional handler every time a channel is initialized.
    • Method Detail

      • initChannel

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