Class TcpChannelInitializer

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

    public class TcpChannelInitializer
    extends ProtocolChannelInitializer<io.netty.channel.socket.SocketChannel>
    Initializes TCP / TLS channel.
    Author:
    michal.polkorab
    • Constructor Detail

      • TcpChannelInitializer

        public TcpChannelInitializer()
        Default constructor.
      • TcpChannelInitializer

        protected TcpChannelInitializer​(io.netty.channel.group.DefaultChannelGroup channelGroup,
                                        ConnectionAdapterFactory connAdaptorFactory)
        Testing constructor.
    • 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>
      • getConnectionIterator

        public Iterator<io.netty.channel.Channel> getConnectionIterator()
        Returns the connection iterator.
        Returns:
        iterator through active connections
      • size

        public int size()
        Returns the number of active channels.
        Returns:
        amount of active channels