Interface NetworkConnector

    • Method Detail

      • open

        void open()

        Performs the activities needed to open the network communication (for example, to start accepting incoming network connections).

        Throws: - if this connector cannot be opened
        See Also:
      • close

        void close()

        Performs the activities needed to close the network communication (for example, to stop accepting network connections).

        Once a connector has been closed, it cannot be opened again without first calling LifeCycle.stop() and it will not be active again until a subsequent call to LifeCycle.start()
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface
      • isOpen

        boolean isOpen()
        A Connector may be opened and not started (to reserve a port) or closed and running (to allow graceful shutdown of existing connections)
        True if the connector is Open.
      • getHost

        java.lang.String getHost()
        The hostname representing the interface to which this connector will bind, or null for all interfaces.
      • getPort

        int getPort()
        The configured port for the connector or 0 if any available port may be used.
      • getLocalPort

        int getLocalPort()
        The actual port the connector is listening on, or -1 if it has not been opened, or -2 if it has been closed.