Overview | Package | Class | Tree | Deprecated | Index | Help
| Openfire 3.7.1 Javadoc
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jivesoftware.openfire.spi
Class ConnectionManagerImpl

    java.lang.Object
      org.jivesoftware.openfire.container.BasicModule
          org.jivesoftware.openfire.spi.ConnectionManagerImpl

All Implemented Interfaces:
  ConnectionManager, Module, CertificateEventListener

    public class ConnectionManagerImpl

extends BasicModule
implements ConnectionManager, CertificateEventListener

Field Summary

Fields inherited from interface org.jivesoftware.openfire.ConnectionManager
`DEFAULT_COMPONENT_PORT, DEFAULT_MULTIPLEX_PORT, DEFAULT_PORT, DEFAULT_SERVER_PORT, DEFAULT_SSL_PORT`

Constructor Summary
`ConnectionManagerImpl()`

Method Summary
`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.SocketAcceptor` | `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.SocketAcceptor` | `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.SocketAcceptor` | `getSocketAcceptor()`
`org.apache.mina.transport.socket.nio.SocketAcceptor` | `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.

Methods inherited from class org.jivesoftware.openfire.container.BasicModule
`destroy, getName`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### ConnectionManagerImpl

    public ConnectionManagerImpl()

Method Detail

### getPorts

    public Collection<ServerPort> getPorts()

  Description copied from interface: `ConnectionManager`
  Returns an array of the ports managed by this connection manager.

  Specified by:
    `getPorts` in interface `ConnectionManager`
  Returns:
    an iterator of the ports managed by this connection manager (can be an empty but never null).

### createSocketReader

    public SocketReader createSocketReader(Socket sock,
                                           boolean isSecure,
                                           ServerPort serverPort,
                                           boolean useBlockingMode)
                                    throws IOException

  Description copied from interface: `ConnectionManager`
  Creates a new socket reader for the new accepted socket to be managed by the connection manager.

  Specified by:
    `createSocketReader` in interface `ConnectionManager`
  Parameters:
    `sock` - 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.
  Returns:
    the created socket reader.
  Throws:
    `IOException` - when there is an error creating the socket reader.

### initialize

    public void initialize(XMPPServer server)

  Description copied from class: `BasicModule`

  Initializes the basic module.

  Inheriting classes that choose to override this method MUST call this initialize() method before accessing BasicModule resources.

  Specified by:
    `initialize` in interface `Module`
  Overrides:
    `initialize` in class `BasicModule`
  Parameters:
    `server` - the server hosting this module.

### enableClientListener

    public void enableClientListener(boolean enabled)

  Description copied from interface: `ConnectionManager`
  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.

  Specified by:
    `enableClientListener` in interface `ConnectionManager`
  Parameters:
    `enabled` - true if new unsecured clients will be able to connect to the server.

### isClientListenerEnabled

    public boolean isClientListenerEnabled()

  Description copied from interface: `ConnectionManager`
  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.

  Specified by:
    `isClientListenerEnabled` in interface `ConnectionManager`
  Returns:
    true if the port listener for unsecured clients is available.

### enableClientSSLListener

    public void enableClientSSLListener(boolean enabled)

  Description copied from interface: `ConnectionManager`
  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.

  Specified by:
    `enableClientSSLListener` in interface `ConnectionManager`
  Parameters:
    `enabled` - true if new secured clients will be able to connect to the server.

### isClientSSLListenerEnabled

    public boolean isClientSSLListenerEnabled()

  Description copied from interface: `ConnectionManager`
  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.

  Specified by:
    `isClientSSLListenerEnabled` in interface `ConnectionManager`
  Returns:
    true if the port listener for unsecured clients is available.

### enableComponentListener

    public void enableComponentListener(boolean enabled)

  Description copied from interface: `ConnectionManager`
  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.

  Specified by:
    `enableComponentListener` in interface `ConnectionManager`
  Parameters:
    `enabled` - true if new external components will be able to connect to the server.

### isComponentListenerEnabled

    public boolean isComponentListenerEnabled()

  Description copied from interface: `ConnectionManager`
  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.

  Specified by:
    `isComponentListenerEnabled` in interface `ConnectionManager`
  Returns:
    true if the port listener for external components is available.

### enableServerListener

    public void enableServerListener(boolean enabled)

  Description copied from interface: `ConnectionManager`
  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.

  Specified by:
    `enableServerListener` in interface `ConnectionManager`
  Parameters:
    `enabled` - true if new remote servers will be able to connect to the server.

### isServerListenerEnabled

    public boolean isServerListenerEnabled()

  Description copied from interface: `ConnectionManager`
  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.

  Specified by:
    `isServerListenerEnabled` in interface `ConnectionManager`
  Returns:
    true if the port listener for remote servers is available.

### enableConnectionManagerListener

    public void enableConnectionManagerListener(boolean enabled)

  Description copied from interface: `ConnectionManager`
  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.

  Specified by:
    `enableConnectionManagerListener` in interface `ConnectionManager`
  Parameters:
    `enabled` - true if new connection managers will be able to connect to the server.

### isConnectionManagerListenerEnabled

    public boolean isConnectionManagerListenerEnabled()

  Description copied from interface: `ConnectionManager`
  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.

  Specified by:
    `isConnectionManagerListenerEnabled` in interface `ConnectionManager`
  Returns:
    true if the port listener for connection managers is available.

### setClientListenerPort

    public void setClientListenerPort(int port)

  Description copied from interface: `ConnectionManager`
  Sets the port to use for unsecured clients. Default port: 5222.

  Specified by:
    `setClientListenerPort` in interface `ConnectionManager`
  Parameters:
    `port` - the port to use for unsecured clients.

### getSocketAcceptor

    public org.apache.mina.transport.socket.nio.SocketAcceptor getSocketAcceptor()

### getClientListenerPort

    public int getClientListenerPort()

  Description copied from interface: `ConnectionManager`
  Returns the port to use for unsecured clients. Default port: 5222.

  Specified by:
    `getClientListenerPort` in interface `ConnectionManager`
  Returns:
    the port to use for unsecured clients.

### getSSLSocketAcceptor

    public org.apache.mina.transport.socket.nio.SocketAcceptor getSSLSocketAcceptor()

### setClientSSLListenerPort

    public void setClientSSLListenerPort(int port)

  Description copied from interface: `ConnectionManager`
  Sets the port to use for secured clients. Default port: 5223.

  Specified by:
    `setClientSSLListenerPort` in interface `ConnectionManager`
  Parameters:
    `port` - the port to use for secured clients.

### getClientSSLListenerPort

    public int getClientSSLListenerPort()

  Description copied from interface: `ConnectionManager`
  Returns the port to use for secured clients. Default port: 5223.

  Specified by:
    `getClientSSLListenerPort` in interface `ConnectionManager`
  Returns:
    the port to use for secured clients.

### setComponentListenerPort

    public void setComponentListenerPort(int port)

  Description copied from interface: `ConnectionManager`
  Sets the port to use for external components.

  Specified by:
    `setComponentListenerPort` in interface `ConnectionManager`
  Parameters:
    `port` - the port to use for external components.

### getComponentAcceptor

    public org.apache.mina.transport.socket.nio.SocketAcceptor getComponentAcceptor()

### getComponentListenerPort

    public int getComponentListenerPort()

  Description copied from interface: `ConnectionManager`
  Returns the port to use for external components.

  Specified by:
    `getComponentListenerPort` in interface `ConnectionManager`
  Returns:
    the port to use for external components.

### setServerListenerPort

    public void setServerListenerPort(int port)

  Description copied from interface: `ConnectionManager`
  Sets the port to use for remote servers. This port is used for remote servers to connect to this server. Default port: 5269.

  Specified by:
    `setServerListenerPort` in interface `ConnectionManager`
  Parameters:
    `port` - the port to use for remote servers.

### getServerListenerPort

    public int getServerListenerPort()

  Description copied from interface: `ConnectionManager`
  Returns the port to use for remote servers. This port is used for remote servers to connect to this server. Default port: 5269.

  Specified by:
    `getServerListenerPort` in interface `ConnectionManager`
  Returns:
    the port to use for remote servers.

### getMultiplexerSocketAcceptor

    public org.apache.mina.transport.socket.nio.SocketAcceptor getMultiplexerSocketAcceptor()

### setConnectionManagerListenerPort

    public void setConnectionManagerListenerPort(int port)

  Description copied from interface: `ConnectionManager`
  Sets the port to use for connection managers. This port is used for connection managers to connect to this server. Default port: 5262.

  Specified by:
    `setConnectionManagerListenerPort` in interface `ConnectionManager`
  Parameters:
    `port` - the port to use for connection managers.

### getConnectionManagerListenerPort

    public int getConnectionManagerListenerPort()

  Description copied from interface: `ConnectionManager`
  Returns the port to use for remote servers. This port is used for connection managers to connect to this server. Default port: 5262.

  Specified by:
    `getConnectionManagerListenerPort` in interface `ConnectionManager`
  Returns:
    the port to use for connection managers.

### certificateCreated

    public void certificateCreated(KeyStore keyStore,
                                   String alias,
                                   X509Certificate cert)

  Description copied from interface: `CertificateEventListener`
  Event triggered when a new certificate is created.

  Specified by:
    `certificateCreated` in interface `CertificateEventListener`
  Parameters:
    `keyStore` - key store where the certificate has been added.
    `alias` - the alias of the certificate in the keystore.
    `cert` - the new certificate created.

### certificateDeleted

    public void certificateDeleted(KeyStore keyStore,
                                   String alias)

  Description copied from interface: `CertificateEventListener`
  Event triggered when a certificate is being deleted from the keystore.

  Specified by:
    `certificateDeleted` in interface `CertificateEventListener`
  Parameters:
    `keyStore` - key store where the certificate is being deleted.
    `alias` - the alias of the certificate in the keystore.

### certificateSigned

    public void certificateSigned(KeyStore keyStore,
                                  String alias,
                                  List<X509Certificate> certificates)

  Description copied from interface: `CertificateEventListener`
  Event triggered when a certificate has been signed by a Certificate Authority.

  Specified by:
    `certificateSigned` in interface `CertificateEventListener`
  Parameters:
    `keyStore` - 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.

### start

    public void start()

  Description copied from class: `BasicModule`

  Starts the basic module.

  Inheriting classes that choose to override this method MUST call this start() method before accessing BasicModule resources.

  Specified by:
    `start` in interface `Module`
  Overrides:
    `start` in class `BasicModule`

### stop

    public void stop()

  Description copied from class: `BasicModule`

  Stops the basic module.

  Inheriting classes that choose to override this method MUST call this stop() method before accessing BasicModule resources.

  Specified by:
    `stop` in interface `Module`
  Overrides:
    `stop` in class `BasicModule`

Overview | Package | Class | Tree | Deprecated | Index | Help
| Openfire 3.7.1 Javadoc
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2003-2008 Jive Software.