Class NettyUtils


  • public class NettyUtils
    extends Object
    Utilities for generating Netty resources dependent on the operating system.
    Author:
    Eyal Schneider
    • Constructor Detail

      • NettyUtils

        public NettyUtils()
    • Method Detail

      • newEventLoopGroup

        public static io.netty.channel.EventLoopGroup newEventLoopGroup​(int nThreads)
        Parameters:
        nThreads - The required number of threads in the group
        Returns:
        A new EventLoopGroup, suitable for the current OS.
      • getServerSocketChanneClass

        public static Class<? extends io.netty.channel.socket.ServerSocketChannel> getServerSocketChanneClass()
        Returns:
        The server socket channel impl class suitable for the OS
      • getSocketChanneClass

        public static Class<? extends io.netty.channel.socket.SocketChannel> getSocketChanneClass()
        Returns:
        The socket channel impl class suitable for the OS