Package org.jivesoftware.openfire
Interface ConnectionManager
- All Known Implementing Classes:
ConnectionManagerImpl
public interface ConnectionManager
Coordinates connections (accept, read, termination) on the server.
- Author:
- Iain Shigeoka
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe default XMPP port for external components.static final intThe XMPP port for external components using SSL traffic.static final intThe default XMPP port for connection multiplex.static final intThe default XMPP port for connection multiplex.static final intThe default XMPP port for clients.static final intThe default XMPP port for server2server communication, optionally using StartTLS.static final intThe default XMPP port for server2server communication using Direct TLS.static final intThe default Jabber port for Direct TLS traffic. -
Method Summary
Modifier and TypeMethodDescriptionvoidenable(ConnectionType type, boolean startInDirectTlsMode, boolean enabled) Enables or disables a connection listener.getListener(ConnectionType type, boolean startInDirectTlsMode) Returns a connection listener.Returns all connection listeners.getListeners(ConnectionType type) Returns al connection listeners for the provided type.intgetPort(ConnectionType type, boolean startInDirectTlsMode) Retrieves the configured TCP port on which a listener accepts connections.booleanisEnabled(ConnectionType type, boolean startInDirectTlsMode) Return if the configuration allows this listener to be enabled (but does not verify that the listener is indeed active) The #startInSslMode parameter is used to distinguish between listeners that expect to receive TLS encrypted data immediately, as opposed to connections that initially accept plain text data (the latter are typically subject to StartTLS for in-band encryption configuration).voidsetPort(ConnectionType type, boolean startInDirectTlsMode, int port) Sets the TCP port on which a listener accepts connections.
-
Field Details
-
DEFAULT_PORT
static final int DEFAULT_PORTThe default XMPP port for clients. This port can be used with encrypted and unencrypted connections. Clients will initially connect using an unencrypted connection and may encrypt it by using StartTLS.- See Also:
-
DEFAULT_SSL_PORT
static final int DEFAULT_SSL_PORTThe default Jabber port for Direct TLS traffic. This method uses connections that are encrypted as soon as they are created.- See Also:
-
DEFAULT_COMPONENT_PORT
static final int DEFAULT_COMPONENT_PORTThe default XMPP port for external components.- See Also:
-
DEFAULT_COMPONENT_SSL_PORT
static final int DEFAULT_COMPONENT_SSL_PORTThe XMPP port for external components using SSL traffic.- See Also:
-
DEFAULT_SERVER_PORT
static final int DEFAULT_SERVER_PORTThe default XMPP port for server2server communication, optionally using StartTLS.- See Also:
-
DEFAULT_SERVER_SSL_PORT
static final int DEFAULT_SERVER_SSL_PORTThe default XMPP port for server2server communication using Direct TLS.- See Also:
-
DEFAULT_MULTIPLEX_PORT
static final int DEFAULT_MULTIPLEX_PORTThe default XMPP port for connection multiplex.- See Also:
-
DEFAULT_MULTIPLEX_SSL_PORT
static final int DEFAULT_MULTIPLEX_SSL_PORTThe default XMPP port for connection multiplex.- See Also:
-
-
Method Details
-
isEnabled
Return if the configuration allows this listener to be enabled (but does not verify that the listener is indeed active) The #startInSslMode parameter is used to distinguish between listeners that expect to receive TLS encrypted data immediately, as opposed to connections that initially accept plain text data (the latter are typically subject to StartTLS for in-band encryption configuration). When for a particular connection type only one of these options is implemented, the parameter value is ignored.- Parameters:
type- The connection type for which a listener is to be configured.startInDirectTlsMode- true when the listener to be configured is in Direct TLS mode, otherwise false.- Returns:
- true if configuration allows this listener to be enabled, otherwise false.
-
enable
Enables or disables a connection listener. Does nothing if the particular listener is already in the requested state. The #startInSslMode parameter is used to distinguish between listeners that expect to receive TLS encrypted data immediately, as opposed to connections that initially accept plain text data (the latter are typically subject to StartTLS for in-band encryption configuration). When for a particular connection type only one of these options is implemented, the parameter value is ignored.- Parameters:
type- The connection type for which a listener is to be configured.startInDirectTlsMode- true when the listener to be configured is in Direct TLS mode, otherwise false.enabled- true if the listener is to be enabled, otherwise false.
-
getPort
Retrieves the configured TCP port on which a listener accepts connections.- Parameters:
type- The connection type for which a listener is to be configured.startInDirectTlsMode- true when the listener to be configured is in Direct TLS mode, otherwise false.- Returns:
- a port number.
-
setPort
Sets the TCP port on which a listener accepts connections.- Parameters:
type- The connection type for which a listener is to be configured.startInDirectTlsMode- true when the listener to be configured is in Direct TLS mode, otherwise false.port- a port number.
-
getListeners
Set<ConnectionListener> getListeners()Returns all connection listeners.- Returns:
- All connection listeners (never null).
-
getListeners
Returns al connection listeners for the provided type.- Parameters:
type- The connection type for which a listener is to be configured.- Returns:
- The connection listener (never null).
-
getListener
Returns a connection listener. The #startInSslMode parameter is used to distinguish between listeners that expect to receive TLS encrypted data immediately, as opposed to connections that initially accept plain text data (the latter are typically subject to StartTLS for in-band encryption configuration). When for a particular connection type only one of these options is implemented, the parameter value is ignored.- Parameters:
type- The connection type for which a listener is to be configured.startInDirectTlsMode- true when the listener to be configured is in Direct TLS mode, otherwise false.- Returns:
- The connection listener (never null).
-