public class ConnectionMultiplexerManager extends Object implements SessionEventListener
Modifier and Type | Method and Description |
---|---|
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,
StreamID streamID)
Closes an existing client session that was established through a connection manager.
|
boolean |
createClientSession(String connectionManagerDomain,
StreamID streamID,
String hostName,
String hostAddress)
Creates a new client session that was established to the specified connection manager.
|
LocalClientSession |
getClientSession(String connectionManagerDomain,
StreamID 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. |
ConnectionMultiplexerSession |
getMultiplexerSession(String connectionManagerDomain,
StreamID streamID)
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 |
resourceBound(Session session)
A session has finished resource binding.
|
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.
|
public static ConnectionMultiplexerManager getInstance()
public static String getDefaultSecret()
public static void setDefaultSecret(String defaultSecret)
defaultSecret
- the default secret key that connection managers should present
while trying to establish a new connection.public boolean createClientSession(String connectionManagerDomain, StreamID streamID, String hostName, String hostAddress)
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.hostName
- the address's hostname of the client or null if using old connection manager.hostAddress
- the textual representation of the address of the client or null if using old CM.public void closeClientSession(String connectionManagerDomain, StreamID streamID)
connectionManagerDomain
- the connection manager that is handling the connection
of the session.streamID
- the stream ID created by the connection manager for the session.public void multiplexerAvailable(String connectionManagerName)
connectionManagerName
- the connection manager that has become available.public void multiplexerUnavailable(String connectionManagerName)
connectionManagerName
- the connection manager that is no longer available.public LocalClientSession getClientSession(String connectionManagerDomain, StreamID streamID)
connectionManagerDomain
- the connection manager that is handling the connection
of the session.streamID
- the stream ID created by the connection manager for the session.public ConnectionMultiplexerSession getMultiplexerSession(String connectionManagerDomain, StreamID streamID)
ConnectionMultiplexerSession
for the specified connection manager
domain or null if none was found. If a StreamID is passed in, the same connection
will always be used for that StreamID. Otherwise, if the connection manager has many
connections established with the server then one of them will be selected randomly.connectionManagerDomain
- the domain of the connection manager to get a session.streamID
- if provided, the same connection will always be used for a given streamIDpublic ConnectionMultiplexerSession getMultiplexerSession(String connectionManagerDomain)
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.connectionManagerDomain
- the domain of the connection manager to get a session.public Collection<String> getMultiplexers()
public int getNumConnectedClients(String managerName)
managerName
- the name of the connection manager.public void anonymousSessionCreated(Session session)
SessionEventListener
anonymousSessionCreated
in interface SessionEventListener
session
- the authenticated session of an anonymous user.public void anonymousSessionDestroyed(Session session)
SessionEventListener
anonymousSessionDestroyed
in interface SessionEventListener
session
- the authenticated session of an anonymous user.public void sessionCreated(Session session)
SessionEventListener
sessionCreated
in interface SessionEventListener
session
- the authenticated session of a non anonymous user.public void sessionDestroyed(Session session)
SessionEventListener
sessionDestroyed
in interface SessionEventListener
session
- the authenticated session of a non anonymous user.public void resourceBound(Session session)
SessionEventListener
resourceBound
in interface SessionEventListener
session
- the session on which resource binding was performed.Copyright © 2003-2008 Jive Software.