Openfire 3.3.2 Javadoc

org.jivesoftware.openfire.multiplex
Class ConnectionMultiplexerManager

java.lang.Object
  extended by org.jivesoftware.openfire.multiplex.ConnectionMultiplexerManager
All Implemented Interfaces:
SessionEventListener

public class ConnectionMultiplexerManager
extends Object
implements SessionEventListener

A ConnectionMultiplexerManager is responsible for keeping track of the connected Connection Managers and the sessions that were established with the Connection Managers. Moreover, a ConnectionMultiplexerManager is able to create, get and close client sessions based on Connection requests.

Author:
Gaston Dombiak

Method Summary
 void anonymousSessionCreated(Session session)
          Notification event indicating that an anonymous user has authenticated with the server.
 void anonymousSessionDestroyed(Session session)
          /** An authenticated session of an anonymous user was destroyed.
 void closeClientSession(String connectionManagerDomain, String streamID)
          Closes an existing client session that was established through a connection manager.
 void createClientSession(String connectionManagerDomain, String streamID)
          Creates a new client session that was established to the specified connection manager.
 ClientSession getClientSession(String connectionManagerDomain, String streamID)
          Returns the ClientSession with the specified stream ID that is being hosted by the specified connection manager.
static String getDefaultSecret()
          Returns the default secret key that connection managers should present while trying to establish a new connection.
static ConnectionMultiplexerManager getInstance()
          Returns the unique instance of this class.
 Collection<String> getMultiplexers()
          Returns the names of the connected connection managers to this server.
 ConnectionMultiplexerSession getMultiplexerSession(String connectionManagerDomain)
          Returns a ConnectionMultiplexerSession for the specified connection manager domain or null if none was found.
 int getNumConnectedClients(String managerName)
          Returns the number of connected clients to a specific connection manager.
 void multiplexerAvailable(String connectionManagerName)
          A connection manager has become available.
 void multiplexerUnavailable(String connectionManagerName)
          A connection manager has gone unavailable.
 void sessionCreated(Session session)
          Notification event indicating that a user has authenticated with the server.
 void sessionDestroyed(Session session)
          An authenticated session of a non anonymous user was destroyed.
static void setDefaultSecret(String defaultSecret)
          Sets the default secret key that connection managers should present while trying to establish a new connection.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static ConnectionMultiplexerManager getInstance()
Returns the unique instance of this class.

Returns:
the unique instance of this class.

getDefaultSecret

public static String getDefaultSecret()
Returns the default secret key that connection managers should present while trying to establish a new connection.

Returns:
the default secret key that connection managers should present while trying to establish a new connection.

setDefaultSecret

public static void setDefaultSecret(String defaultSecret)
Sets the default secret key that connection managers should present while trying to establish a new connection.

Parameters:
defaultSecret - the default secret key that connection managers should present while trying to establish a new connection.

createClientSession

public void createClientSession(String connectionManagerDomain,
                                String streamID)
Creates a new client session that was established to the specified connection manager. The new session will not be findable through its stream ID.

Parameters:
connectionManagerDomain - the connection manager that is handling the connection of the session.
streamID - the stream ID created by the connection manager for the new session.

closeClientSession

public void closeClientSession(String connectionManagerDomain,
                               String streamID)
Closes an existing client session that was established through a connection manager.

Parameters:
connectionManagerDomain - the connection manager that is handling the connection of the session.
streamID - the stream ID created by the connection manager for the session.

multiplexerAvailable

public void multiplexerAvailable(String connectionManagerName)
A connection manager has become available. Clients can now connect to the server through the connection manager.

Parameters:
connectionManagerName - the connection manager that has become available.

multiplexerUnavailable

public void multiplexerUnavailable(String connectionManagerName)
A connection manager has gone unavailable. Close client sessions that were established to the specified connection manager.

Parameters:
connectionManagerName - the connection manager that is no longer available.

getClientSession

public ClientSession getClientSession(String connectionManagerDomain,
                                      String streamID)
Returns the ClientSession with the specified stream ID that is being hosted by the specified connection manager.

Parameters:
connectionManagerDomain - the connection manager that is handling the connection of the session.
streamID - the stream ID created by the connection manager for the session.
Returns:
the ClientSession with the specified stream ID.

getMultiplexerSession

public ConnectionMultiplexerSession getMultiplexerSession(String connectionManagerDomain)
Returns a ConnectionMultiplexerSession for the specified connection manager domain or null if none was found. In case the connection manager has many connections established with the server then one of them will be selected randomly.

Parameters:
connectionManagerDomain - the domain of the connection manager to get a session.
Returns:
a session to the specified connection manager domain or null if none was found.

getMultiplexers

public Collection<String> getMultiplexers()
Returns the names of the connected connection managers to this server.

Returns:
the names of the connected connection managers to this server.

getNumConnectedClients

public int getNumConnectedClients(String managerName)
Returns the number of connected clients to a specific connection manager.

Parameters:
managerName - the name of the connection manager.
Returns:
the number of connected clients to a specific connection manager.

anonymousSessionCreated

public void anonymousSessionCreated(Session session)
Description copied from interface: SessionEventListener
Notification event indicating that an anonymous user has authenticated with the server.

Specified by:
anonymousSessionCreated in interface SessionEventListener
Parameters:
session - the authenticated session of an anonymous user.

anonymousSessionDestroyed

public void anonymousSessionDestroyed(Session session)
Description copied from interface: SessionEventListener
/** An authenticated session of an anonymous user was destroyed.

Specified by:
anonymousSessionDestroyed in interface SessionEventListener
Parameters:
session - the authenticated session of an anonymous user.

sessionCreated

public void sessionCreated(Session session)
Description copied from interface: SessionEventListener
Notification event indicating that a user has authenticated with the server. The authenticated user is not an anonymous user.

Specified by:
sessionCreated in interface SessionEventListener
Parameters:
session - the authenticated session of a non anonymous user.

sessionDestroyed

public void sessionDestroyed(Session session)
Description copied from interface: SessionEventListener
An authenticated session of a non anonymous user was destroyed.

Specified by:
sessionDestroyed in interface SessionEventListener
Parameters:
session - the authenticated session of a non anonymous user.

Openfire 3.3.2 Javadoc

Copyright © 2003-2007 Jive Software.