com.cafesoft.cams.session
Interface RemoteSessionManager

All Superinterfaces:
Debuggable, Lifecycle

public interface RemoteSessionManager
extends Lifecycle, Debuggable

Maintains references to RemoteSessions that are used on the various clients/agents that administer Access Control.

Since:
6/4/02
See Also:
Session, RemoteSession

Field Summary
 
Fields inherited from interface com.cafesoft.core.lifecycle.Lifecycle
START_EVENT, STOP_EVENT
 
Method Summary
 void addRemoteSessionEventListener(RemoteSessionEventListener listener)
          Add a RemoteSessionEventListener.
 void addSession(RemoteSession session)
          Add a RemoteSession to the RemoteSessionManager This method will attempt to add a RemoteSession to the list of RemoteSessions managed by the RemoteSessionManager.
 boolean exists(RemoteSession session)
          Determine if the RemoteSession exists within the RemoteSessionManager.
 boolean exists(SessionId sessionId)
          Determine if the RemoteSession exists within the RemoteSessionManager.
 RemoteSession getSession(SessionId sessionId)
          Get a RemoteSession Attempts to retrieve a RemoteSession from the RemoteSessionManager
 void initialize(Config config)
          Initialize the RemoteSessionManager This method takes the Config object passed into it and initializes the RemoteSessionManager
 void removeRemoteSessionEventListener(RemoteSessionEventListener listener)
          Remove a RemoteSessionEventListener.
 void removeSession(RemoteSession session)
          Remove a RemoteSession Removes the specified RemoteSession from the RemoteSessionManager.
 void removeSession(SessionId sessionId)
          Remove a RemoteSession Removes the specified RemoteSession from the RemoteSessionManager.
 void updateSession(RemoteSession session)
          Update a RemoteSession This method will attempt to update RemoteSession information for a RemoteSession Object already contained within the RemoteSessionManager.
 
Methods inherited from interface com.cafesoft.core.lifecycle.Lifecycle
addLifecycleListener, isStarted, removeLifecycleListener, start, stop
 
Methods inherited from interface com.cafesoft.core.util.Debuggable
setDebug
 

Method Detail

initialize

void initialize(Config config)
                throws ConfigException
Initialize the RemoteSessionManager

This method takes the Config object passed into it and initializes the RemoteSessionManager

Parameters:
config - the Config object
Throws:
ConfigException - thrown if config is null

addSession

void addSession(RemoteSession session)
Add a RemoteSession to the RemoteSessionManager

This method will attempt to add a RemoteSession to the list of RemoteSessions managed by the RemoteSessionManager.

If the RemoteSession already exists within the RemoteSessionManager its values are updated.

If the RemoteSession is null the method simply returns

Parameters:
session - the RemoteSession Object to add

updateSession

void updateSession(RemoteSession session)
Update a RemoteSession

This method will attempt to update RemoteSession information for a RemoteSession Object already contained within the RemoteSessionManager.

If the RemoteSession exists within the RemoteSessionManager it's internal data is updated (items such as last touch time and SessionStatus) If the RemoteSession does not exist within the RemoteSessionManager it is added to the the RemoteSessionManager.

If the RemoteSession's status has changed to EXPIRED or CLOSED the RemoteSession Object will be removed.

Parameters:
session - the RemoteSession Object to update

removeSession

void removeSession(RemoteSession session)
Remove a RemoteSession

Removes the specified RemoteSession from the RemoteSessionManager. This method uses the RemoteSession object as the identifier to locate which RemoteSession should be removed.

If the RemoteSession to be removed is null the method simply returns.

Parameters:
session - the RemoteSession to remove

removeSession

void removeSession(SessionId sessionId)
Remove a RemoteSession

Removes the specified RemoteSession from the RemoteSessionManager. This method uses the session id as the identifier to locate which RemoteSession should be removed.

If the session id is null the method simply returns.

Parameters:
sessionId - the session id of the RemoteSession to remove

getSession

RemoteSession getSession(SessionId sessionId)
Get a RemoteSession

Attempts to retrieve a RemoteSession from the RemoteSessionManager

Parameters:
sessionId - the session id of the RemoteSession to retrieve from the RemoteSessionManager
Returns:
if the RemoteSession with the specified session id exists, it is returned. Otherwise, the method will return null. In addition, if the session id is null the method will return null.

exists

boolean exists(RemoteSession session)
Determine if the RemoteSession exists within the RemoteSessionManager.

If session is null, the method returns false

Parameters:
session - the RemoteSession object used to determine if the RemoteSession exists within the RemoteSessionManager
Returns:
true if the RemoteSession exists withing the RemoteSessionManager, false otherwise

exists

boolean exists(SessionId sessionId)
Determine if the RemoteSession exists within the RemoteSessionManager.

If session id is null, the method returns false

Parameters:
sessionId - the session id of the RemoteSession used to determine if the RemoteSession exists within the RemoteSessionManager
Returns:
true if the RemoteSession exists withing the RemoteSessionManager, false otherwise

addRemoteSessionEventListener

void addRemoteSessionEventListener(RemoteSessionEventListener listener)
Add a RemoteSessionEventListener.

Parameters:
listener - the RemoteSessionEventListener instance

removeRemoteSessionEventListener

void removeRemoteSessionEventListener(RemoteSessionEventListener listener)
Remove a RemoteSessionEventListener.

Parameters:
listener - the RemoteSessionEventListener instance to be removed


Generated on 10:38:35 AM April 14, 2011, © 1996-2010 Cafésoft LLC. All rights reserved.