Class UdpHandler

    • Constructor Detail

      • UdpHandler

        public UdpHandler​(int port,
                          Runnable readyRunnable)
        Constructor of UdpHandler that listens on selected port.
        Parameters:
        port - listening port of UdpHandler server
      • UdpHandler

        public UdpHandler​(InetAddress address,
                          int port,
                          Runnable readyRunnable)
        Constructor of UdpHandler that listens on selected address and port.
        Parameters:
        address - listening address of UdpHandler server
        port - listening port of UdpHandler server
    • Method Detail

      • run

        public void run()
        Specified by:
        run in interface Runnable
      • getPort

        public int getPort()
      • setChannelInitializer

        public void setChannelInitializer​(UdpChannelInitializer channelInitializer)
      • initiateEventLoopGroups

        public void initiateEventLoopGroups​(ThreadConfiguration threadConfiguration,
                                            boolean isEpollEnabled)
        Initiate event loop groups.
        Parameters:
        threadConfiguration - number of threads to be created, if not specified in threadConfig
      • initiateNioEventLoopGroups

        public void initiateNioEventLoopGroups​(ThreadConfiguration threadConfiguration)
        Initiate Nio event loop groups.
        Parameters:
        threadConfiguration - number of threads to be created, if not specified in threadConfig
      • initiateEpollEventLoopGroups

        protected void initiateEpollEventLoopGroups​(ThreadConfiguration threadConfiguration)
        Initiate Epoll event loop groups with Nio as fall back.
        Parameters:
        threadConfiguration - the ThreadConfiguration