Class DefaultListeningIOReactor

    • Method Detail

      • listen

        public ListenerEndpoint listen​(java.net.SocketAddress address)
        Description copied from interface: ListeningIOReactor
        Opens a new listener endpoint with the given socket address. Once the endpoint is fully initialized it starts accepting incoming connections and propagates I/O activity notifications to the I/O event dispatcher.

        ListenerEndpoint.waitFor() can be used to wait for the listener to be come ready to accept incoming connections.

        ListenerEndpoint.close() can be used to shut down the listener even before it is fully initialized.

        Specified by:
        listen in interface ListeningIOReactor
        Parameters:
        address - the socket address to listen on.
        Returns:
        listener endpoint.
      • pause

        public void pause()
                   throws java.io.IOException
        Description copied from interface: ListeningIOReactor
        Suspends the I/O reactor preventing it from accepting new connections on all active endpoints.
        Specified by:
        pause in interface ListeningIOReactor
        Throws:
        java.io.IOException - in case of an I/O error.
      • resume

        public void resume()
                    throws java.io.IOException
        Description copied from interface: ListeningIOReactor
        Resumes the I/O reactor restoring its ability to accept incoming connections on all active endpoints.
        Specified by:
        resume in interface ListeningIOReactor
        Throws:
        java.io.IOException - in case of an I/O error.