Class AbstractNetworkConnector

    • Constructor Detail

    • Method Detail

      • setHost

        public void setHost​(java.lang.String host)
        Deprecated.
      • getHost

        @ManagedAttribute("The network interface this connector binds to as an IP address or a hostname.  If null or 0.0.0.0, then bind to all interfaces.")
        public java.lang.String getHost()
        Deprecated.
        Specified by:
        getHost in interface NetworkConnector
        Returns:
        The hostname representing the interface to which this connector will bind, or null for all interfaces.
      • setPort

        public void setPort​(int port)
        Deprecated.
      • getPort

        @ManagedAttribute("Port this connector listens on. If set the 0 a random port is assigned which may be obtained with getLocalPort()")
        public int getPort()
        Deprecated.
        Specified by:
        getPort in interface NetworkConnector
        Returns:
        The configured port for the connector or 0 if any available port may be used.
      • getLocalPort

        public int getLocalPort()
        Deprecated.
        Specified by:
        getLocalPort in interface NetworkConnector
        Returns:
        The actual port the connector is listening on, or -1 if it has not been opened, or -2 if it has been closed.
      • open

        public void open()
                  throws java.io.IOException
        Deprecated.
        Description copied from interface: NetworkConnector

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

        Specified by:
        open in interface NetworkConnector
        Throws:
        java.io.IOException - if this connector cannot be opened
        See Also:
        NetworkConnector.close()
      • close

        public void close()
        Deprecated.
        Description copied from interface: NetworkConnector

        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 java.io.Closeable
        Specified by:
        close in interface NetworkConnector