Interface InternalServer

    • Method Detail

      • start

        void start​(ServerListener listener)
            throws java.io.IOException
        Starts transport. Implementations must not call listener until after start() returns. The method only returns after it has done the equivalent of bind()ing, so it will be able to service any connections created after returning.
        Parameters:
        listener - non-null listener of server events
        Throws:
        java.io.IOException - if unable to bind
      • shutdown

        void shutdown()
        Initiates an orderly shutdown of the server. Existing transports continue, but new transports will not be created (once ServerListener.serverShutdown() callback is called). This method may only be called once. Blocks until the listening socket(s) have been closed. If interrupted, this method will not wait for the close to complete, but it will happen asynchronously.
      • getListenSocketAddress

        java.net.SocketAddress getListenSocketAddress()
        Returns the first listening socket address. May change after start(ServerListener) is called.
      • getListenSocketAddresses

        java.util.List<? extends java.net.SocketAddress> getListenSocketAddresses()
        Returns a list of listening socket addresses. May change after start(ServerListener) is called.