public class ConnectionManagerImpl extends BasicModule implements ConnectionManager, CertificateEventListener
| Modifier and Type | Field and Description |
|---|---|
static String |
CAPACITY_FILTER_NAME |
static String |
COMPRESSION_FILTER_NAME |
static String |
EXECUTOR_FILTER_NAME |
static String |
TLS_FILTER_NAME |
static String |
XMPP_CODEC_FILTER_NAME |
DEFAULT_COMPONENT_PORT, DEFAULT_MULTIPLEX_PORT, DEFAULT_PORT, DEFAULT_SERVER_PORT, DEFAULT_SSL_PORT| Constructor and Description |
|---|
ConnectionManagerImpl() |
| Modifier and Type | Method and Description |
|---|---|
void |
certificateCreated(KeyStore keyStore,
String alias,
X509Certificate cert)
Event triggered when a new certificate is created.
|
void |
certificateDeleted(KeyStore keyStore,
String alias)
Event triggered when a certificate is being deleted from the keystore.
|
void |
certificateSigned(KeyStore keyStore,
String alias,
List<X509Certificate> certificates)
Event triggered when a certificate has been signed by a Certificate Authority.
|
SocketReader |
createSocketReader(Socket sock,
boolean isSecure,
ServerPort serverPort,
boolean useBlockingMode)
Creates a new socket reader for the new accepted 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 |
enableConnectionManagerListener(boolean enabled)
Sets if the port listener for connection managers 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.
|
org.apache.mina.transport.socket.nio.NioSocketAcceptor |
getComponentAcceptor() |
int |
getComponentListenerPort()
Returns the port to use for external components.
|
int |
getConnectionManagerListenerPort()
Returns the port to use for remote servers.
|
org.apache.mina.transport.socket.nio.NioSocketAcceptor |
getMultiplexerSocketAcceptor() |
Collection<ServerPort> |
getPorts()
Returns an array of the ports managed by this connection manager.
|
int |
getServerListenerPort()
Returns the port to use for remote servers.
|
org.apache.mina.transport.socket.nio.NioSocketAcceptor |
getSocketAcceptor() |
org.apache.mina.transport.socket.nio.NioSocketAcceptor |
getSSLSocketAcceptor() |
void |
initialize(XMPPServer server)
Initializes the basic module.
|
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 |
isConnectionManagerListenerEnabled()
Returns true if the port listener for connection managers 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 |
setConnectionManagerListenerPort(int port)
Sets the port to use for connection managers.
|
void |
setServerListenerPort(int port)
Sets the port to use for remote servers.
|
void |
start()
Starts the basic module.
|
void |
stop()
Stops the basic module.
|
destroy, getNamepublic static final String EXECUTOR_FILTER_NAME
public static final String TLS_FILTER_NAME
public static final String COMPRESSION_FILTER_NAME
public static final String XMPP_CODEC_FILTER_NAME
public static final String CAPACITY_FILTER_NAME
public Collection<ServerPort> getPorts()
ConnectionManagergetPorts in interface ConnectionManagerpublic SocketReader createSocketReader(Socket sock, boolean isSecure, ServerPort serverPort, boolean useBlockingMode) throws IOException
ConnectionManagercreateSocketReader in interface ConnectionManagersock - the new accepted socket by this manager.isSecure - true if the connection is secure.serverPort - holds information about the port on which the server is listening for
connections.useBlockingMode - true means that the server will use a thread per connection.IOException - when there is an error creating the socket reader.public void initialize(XMPPServer server)
BasicModuleInitializes the basic module.
Inheriting classes that choose to override this method MUST call this initialize() method before accessing BasicModule resources.
initialize in interface Moduleinitialize in class BasicModuleserver - the server hosting this module.public void enableClientListener(boolean enabled)
ConnectionManagerenableClientListener in interface ConnectionManagerenabled - true if new unsecured clients will be able to connect to the server.public boolean isClientListenerEnabled()
ConnectionManagerisClientListenerEnabled in interface ConnectionManagerpublic void enableClientSSLListener(boolean enabled)
ConnectionManagerenableClientSSLListener in interface ConnectionManagerenabled - true if new secured clients will be able to connect to the server.public boolean isClientSSLListenerEnabled()
ConnectionManagerisClientSSLListenerEnabled in interface ConnectionManagerpublic void enableComponentListener(boolean enabled)
ConnectionManagerenableComponentListener in interface ConnectionManagerenabled - true if new external components will be able to connect to the server.public boolean isComponentListenerEnabled()
ConnectionManagerisComponentListenerEnabled in interface ConnectionManagerpublic void enableServerListener(boolean enabled)
ConnectionManagerenableServerListener in interface ConnectionManagerenabled - true if new remote servers will be able to connect to the server.public boolean isServerListenerEnabled()
ConnectionManagerisServerListenerEnabled in interface ConnectionManagerpublic void enableConnectionManagerListener(boolean enabled)
ConnectionManagerenableConnectionManagerListener in interface ConnectionManagerenabled - true if new connection managers will be able to connect to the server.public boolean isConnectionManagerListenerEnabled()
ConnectionManagerisConnectionManagerListenerEnabled in interface ConnectionManagerpublic void setClientListenerPort(int port)
ConnectionManagersetClientListenerPort in interface ConnectionManagerport - the port to use for unsecured clients.public org.apache.mina.transport.socket.nio.NioSocketAcceptor getSocketAcceptor()
public int getClientListenerPort()
ConnectionManagergetClientListenerPort in interface ConnectionManagerpublic org.apache.mina.transport.socket.nio.NioSocketAcceptor getSSLSocketAcceptor()
public void setClientSSLListenerPort(int port)
ConnectionManagersetClientSSLListenerPort in interface ConnectionManagerport - the port to use for secured clients.public int getClientSSLListenerPort()
ConnectionManagergetClientSSLListenerPort in interface ConnectionManagerpublic void setComponentListenerPort(int port)
ConnectionManagersetComponentListenerPort in interface ConnectionManagerport - the port to use for external components.public org.apache.mina.transport.socket.nio.NioSocketAcceptor getComponentAcceptor()
public int getComponentListenerPort()
ConnectionManagergetComponentListenerPort in interface ConnectionManagerpublic void setServerListenerPort(int port)
ConnectionManagersetServerListenerPort in interface ConnectionManagerport - the port to use for remote servers.public int getServerListenerPort()
ConnectionManagergetServerListenerPort in interface ConnectionManagerpublic org.apache.mina.transport.socket.nio.NioSocketAcceptor getMultiplexerSocketAcceptor()
public void setConnectionManagerListenerPort(int port)
ConnectionManagersetConnectionManagerListenerPort in interface ConnectionManagerport - the port to use for connection managers.public int getConnectionManagerListenerPort()
ConnectionManagergetConnectionManagerListenerPort in interface ConnectionManagerpublic void certificateCreated(KeyStore keyStore, String alias, X509Certificate cert)
CertificateEventListenercertificateCreated in interface CertificateEventListenerkeyStore - key store where the certificate has been added.alias - the alias of the certificate in the keystore.cert - the new certificate created.public void certificateDeleted(KeyStore keyStore, String alias)
CertificateEventListenercertificateDeleted in interface CertificateEventListenerkeyStore - key store where the certificate is being deleted.alias - the alias of the certificate in the keystore.public void certificateSigned(KeyStore keyStore, String alias, List<X509Certificate> certificates)
CertificateEventListenercertificateSigned in interface CertificateEventListenerkeyStore - key store where the certificate is stored.alias - the alias of the certificate in the keystore.certificates - chain of certificates. First certificate in the list is the certificate
being signed and last certificate in the list is the root certificate.public void start()
BasicModuleStarts the basic module.
Inheriting classes that choose to override this method MUST call this start() method before accessing BasicModule resources.
start in interface Modulestart in class BasicModulepublic void stop()
BasicModuleStops the basic module.
Inheriting classes that choose to override this method MUST call this stop() method before accessing BasicModule resources.
stop in interface Modulestop in class BasicModuleCopyright © 2003-2008 Jive Software.