org.marketcetera.ors
Class UserManager

java.lang.Object
  extended by org.marketcetera.ors.UserManager

public class UserManager
extends Object

A manager of the set of connected users (active sessions). It also routes ORS replies to ORS clients.

Since:
1.5.0
Version:
$Id: UserManager.java 16154 2012-07-14 16:34:05Z colin $
Author:
tlerios@marketcetera.com

Constructor Summary
UserManager()
          Creates a new user manager.
 
Method Summary
 void addSession(ClientSession session)
          Adds the given session to the receiver.
 void convertAndSend(TradeMessage msg)
          Sends the given message to the appropriate sessions managed by the receiver.
 SessionInfo getSessionInfo(SessionId sessionId)
          Returns the session information associated with the given session ID.
 SessionManager<ClientSession> getSessionManager()
          Returns the receiver's session manager.
 void logStatus()
          Logs the receiver's status.
 void removedSession(ClientSession session)
          Removes the given session from the receiver.
 void sync()
          Updates the receiver's data structures to reflect the current user definitions in the database.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UserManager

public UserManager()
Creates a new user manager.

Method Detail

getSessionManager

public SessionManager<ClientSession> getSessionManager()
Returns the receiver's session manager.

Returns:
The manager.

sync

public void sync()
Updates the receiver's data structures to reflect the current user definitions in the database.


addSession

public void addSession(ClientSession session)
Adds the given session to the receiver.

Parameters:
session - The session.

removedSession

public void removedSession(ClientSession session)
Removes the given session from the receiver.

Parameters:
session - The session.

getSessionInfo

public SessionInfo getSessionInfo(SessionId sessionId)
Returns the session information associated with the given session ID.

Parameters:
sessionId - The session ID.
Returns:
The information. It may be null if the session has expired.

convertAndSend

public void convertAndSend(TradeMessage msg)
Sends the given message to the appropriate sessions managed by the receiver.

Parameters:
msg - The message.

logStatus

public void logStatus()
Logs the receiver's status.



Copyright © 2012. All Rights Reserved.