Jive Messenger 2.2.2 Javadoc

org.jivesoftware.messenger
Interface ConnectionManager

All Known Implementing Classes:
ConnectionManagerImpl

public interface ConnectionManager

Coordinates connections (accept, read, termination) on the server.

Author:
Iain Shigeoka

Method Summary
 void addSocket(Socket socket, boolean isSecure, ServerPort serverPort)
          Adds a socket to be managed by the connection manager.
 void enableClientListener(boolean enabled)
          Sets if the port listener for unsecured clients will be available or not.
 void enableClientSSLListener(boolean enabled)
          Sets if the port listener for secured clients will be available or not.
 void enableComponentListener(boolean enabled)
          Sets if the port listener for external components will be available or not.
 void enableServerListener(boolean enabled)
          Sets if the port listener for remote servers will be available or not.
 int getClientListenerPort()
          Returns the port to use for unsecured clients.
 int getClientSSLListenerPort()
          Returns the port to use for secured clients.
 int getComponentListenerPort()
          Returns the port to use for external components.
 Iterator<ServerPort> getPorts()
          Returns an array of the ports managed by this connection manager.
 int getServerListenerPort()
          Returns the port to use for remote servers.
 boolean isClientListenerEnabled()
          Returns true if the port listener for unsecured clients is available.
 boolean isClientSSLListenerEnabled()
          Returns true if the port listener for secured clients is available.
 boolean isComponentListenerEnabled()
          Returns true if the port listener for external components is available.
 boolean isServerListenerEnabled()
          Returns true if the port listener for remote servers is available.
 void setClientListenerPort(int port)
          Sets the port to use for unsecured clients.
 void setClientSSLListenerPort(int port)
          Sets the port to use for secured clients.
 void setComponentListenerPort(int port)
          Sets the port to use for external components.
 void setServerListenerPort(int port)
          Sets the port to use for remote servers.
 

Method Detail

getPorts

Iterator<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).

addSocket

void addSocket(Socket socket,
               boolean isSecure,
               ServerPort serverPort)
               throws org.xmlpull.v1.XmlPullParserException
Adds a socket to be managed by the connection manager.

Parameters:
socket - the socket to add to this manager for management.
isSecure - true if the connection is secure.
serverPort - holds information about the port on which the server is listening for connections.
Throws:
org.xmlpull.v1.XmlPullParserException

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.

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.

Jive Messenger 2.2.2 Javadoc

Copyright © 1999-2004 Jive Software.