Interface ConnectionManager

  • All Known Implementing Classes:
    ConnectionManagerImpl

    public interface ConnectionManager
    Coordinates connections (accept, read, termination) on the server.
    Author:
    Iain Shigeoka
    • Field Detail

      • DEFAULT_PORT

        static final int DEFAULT_PORT
        The default XMPP port for clients. This port can be used with secured and unsecured connections. Clients will initially connect using an unsecure connection and may secure it by using StartTLS.
        See Also:
        Constant Field Values
      • DEFAULT_SSL_PORT

        static final int DEFAULT_SSL_PORT
        The default legacy Jabber port for SSL traffic. This old method, and soon to be deprecated, uses encrypted connections as soon as they are created.
        See Also:
        Constant Field Values
      • DEFAULT_COMPONENT_PORT

        static final int DEFAULT_COMPONENT_PORT
        The default XMPP port for external components.
        See Also:
        Constant Field Values
      • DEFAULT_COMPONENT_SSL_PORT

        static final int DEFAULT_COMPONENT_SSL_PORT
        The XMPP port for external components using SSL traffic.
        See Also:
        Constant Field Values
      • DEFAULT_SERVER_PORT

        static final int DEFAULT_SERVER_PORT
        The default XMPP port for server2server communication, optionally using StartTLS.
        See Also:
        Constant Field Values
      • DEFAULT_SERVER_SSL_PORT

        static final int DEFAULT_SERVER_SSL_PORT
        The default XMPP port for server2server communication using Direct TLS.
        See Also:
        Constant Field Values
      • DEFAULT_MULTIPLEX_PORT

        static final int DEFAULT_MULTIPLEX_PORT
        The default XMPP port for connection multiplex.
        See Also:
        Constant Field Values
      • DEFAULT_MULTIPLEX_SSL_PORT

        static final int DEFAULT_MULTIPLEX_SSL_PORT
        The default XMPP port for connection multiplex.
        See Also:
        Constant Field Values
    • Method Detail

      • getPorts

        Collection<ServerPort> getPorts()
        Returns an array of the ports managed by this connection manager.
        Returns:
        an iterator of the ports managed by this connection manager (can be an empty but never null).
      • enableClientListener

        void enableClientListener​(boolean enabled)
        Sets if the port listener for unsecured clients will be available or not. When disabled there won't be a port listener active. Therefore, new clients won't be able to connect to the server.
        Parameters:
        enabled - true if new unsecured clients will be able to connect to the server.
      • isClientListenerEnabled

        boolean isClientListenerEnabled()
        Returns true if the port listener for unsecured clients is available. When disabled there won't be a port listener active. Therefore, new clients won't be able to connect to the server.
        Returns:
        true if the port listener for unsecured clients is available.
      • enableClientSSLListener

        void enableClientSSLListener​(boolean enabled)
        Sets if the port listener for secured clients will be available or not. When disabled there won't be a port listener active. Therefore, new secured clients won't be able to connect to the server.
        Parameters:
        enabled - true if new secured clients will be able to connect to the server.
      • isClientSSLListenerEnabled

        boolean isClientSSLListenerEnabled()
        Returns true if the port listener for secured clients is available. When disabled there won't be a port listener active. Therefore, new secured clients won't be able to connect to the server.
        Returns:
        true if the port listener for unsecured clients is available.
      • enableComponentListener

        void enableComponentListener​(boolean enabled)
        Sets if the port listener for external components will be available or not. When disabled there won't be a port listener active. Therefore, new external components won't be able to connect to the server.
        Parameters:
        enabled - true if new external components will be able to connect to the server.
      • isComponentListenerEnabled

        boolean isComponentListenerEnabled()
        Returns true if the port listener for external components is available. When disabled there won't be a port listener active. Therefore, new external components won't be able to connect to the server.
        Returns:
        true if the port listener for external components is available.
      • enableServerListener

        void enableServerListener​(boolean enabled)
        Sets if the port listener for remote servers will be available or not. When disabled there won't be a port listener active. Therefore, new remote servers won't be able to connect to the server.
        Parameters:
        enabled - true if new remote servers will be able to connect to the server.
      • isServerListenerEnabled

        boolean isServerListenerEnabled()
        Returns true if the port listener for remote servers is available. When disabled there won't be a port listener active. Therefore, new remote servers won't be able to connect to the server.
        Returns:
        true if the port listener for remote servers is available.
      • enableConnectionManagerListener

        void enableConnectionManagerListener​(boolean enabled)
        Sets if the port listener for connection managers will be available or not. When disabled there won't be a port listener active. Therefore, clients will need to connect directly to the server.
        Parameters:
        enabled - true if new connection managers will be able to connect to the server.
      • isConnectionManagerListenerEnabled

        boolean isConnectionManagerListenerEnabled()
        Returns true if the port listener for connection managers is available. When disabled there won't be a port listener active. Therefore, clients will need to connect directly to the server.
        Returns:
        true if the port listener for connection managers is available.
      • setClientListenerPort

        void setClientListenerPort​(int port)
        Sets the port to use for unsecured clients. Default port: 5222.
        Parameters:
        port - the port to use for unsecured clients.
      • getClientListenerPort

        int getClientListenerPort()
        Returns the port to use for unsecured clients. Default port: 5222.
        Returns:
        the port to use for unsecured clients.
      • setClientSSLListenerPort

        void setClientSSLListenerPort​(int port)
        Sets the port to use for secured clients. Default port: 5223.
        Parameters:
        port - the port to use for secured clients.
      • getClientSSLListenerPort

        int getClientSSLListenerPort()
        Returns the port to use for secured clients. Default port: 5223.
        Returns:
        the port to use for secured clients.
      • setComponentListenerPort

        void setComponentListenerPort​(int port)
        Sets the port to use for external components.
        Parameters:
        port - the port to use for external components.
      • getComponentListenerPort

        int getComponentListenerPort()
        Returns the port to use for external components.
        Returns:
        the port to use for external components.
      • setServerListenerPort

        void setServerListenerPort​(int port)
        Sets the port to use for remote servers. This port is used for remote servers to connect to this server. Default port: 5269.
        Parameters:
        port - the port to use for remote servers.
      • getServerListenerPort

        int getServerListenerPort()
        Returns the port to use for remote servers. This port is used for remote servers to connect to this server. Default port: 5269.
        Returns:
        the port to use for remote servers.
      • setServerSslListenerPort

        void setServerSslListenerPort​(int port)
        Sets the port to use for remote servers. This port is used for remote servers to connect to this server, using direct TLS. Default port: 5270.
        Parameters:
        port - the port to use for remote servers.
      • getServerSslListenerPort

        int getServerSslListenerPort()
        Returns the port to use for remote servers. This port is used for remote servers to connect to this server, using direct TLS. Default port: 5270.
        Returns:
        the port to use for remote servers.
      • setConnectionManagerListenerPort

        void setConnectionManagerListenerPort​(int port)
        Sets the port to use for connection managers. This port is used for connection managers to connect to this server. Default port: 5262.
        Parameters:
        port - the port to use for connection managers.
      • getConnectionManagerListenerPort

        int getConnectionManagerListenerPort()
        Returns the port to use for remote servers. This port is used for connection managers to connect to this server. Default port: 5262.
        Returns:
        the port to use for connection managers.