com.metamatrix.console.models
Class SessionManager

java.lang.Object
  extended by com.metamatrix.console.models.Manager
      extended by com.metamatrix.console.models.TimedManager
          extended by com.metamatrix.console.models.SessionManager
All Implemented Interfaces:
java.awt.event.ActionListener, java.util.EventListener

public class SessionManager
extends TimedManager

Facade for GUI client to Session objects and Session-related functionality of the remote system. SessionManager maintains a collection of UserSessionInfos for GUI client, manages refreshing of data (for user-specified refresh rate) and exposes session-related business methods.


Field Summary
static java.lang.String SESSION_TERMINATED
          This String is used as a message for a ModelChangedEvent, in the event that a session is terminated
 
Fields inherited from class com.metamatrix.console.models.TimedManager
DEFAULT_DELAY
 
Fields inherited from class com.metamatrix.console.models.Manager
MODEL_CHANGED, MODEL_STALE
 
Constructor Summary
SessionManager(ConnectionInfo connection)
           
 
Method Summary
 java.util.Collection getActiveSessions()
           
 java.util.Collection getSessions()
           
 void init()
          Readies SessionManager to be used.
 boolean isSignedOnUserSessionValid()
           
 void terminateSession(MetaMatrixSessionInfo userSessionInfo)
          Terminates, on remote system, the session specified by the parameter.
 
Methods inherited from class com.metamatrix.console.models.TimedManager
actionPerformed, getIsAutoRefreshEnabled, getRefreshRate, getTimer, isBusy, refresh, refresh, setBusy, setIsAutoRefreshEnabled, setRefreshRate, startTimer
 
Methods inherited from class com.metamatrix.console.models.Manager
addManagerListener, fireModelChangedEvent, fireModelChangedEvent, getConnection, getConnection, getEncryptor, getEventListeners, getIsStale, removeManagerListener, setIsStale
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SESSION_TERMINATED

public static final java.lang.String SESSION_TERMINATED
This String is used as a message for a ModelChangedEvent, in the event that a session is terminated

See Also:
ModelChangedEvent, terminateSession(com.metamatrix.platform.security.api.MetaMatrixSessionInfo), Constant Field Values
Constructor Detail

SessionManager

public SessionManager(ConnectionInfo connection)
Method Detail

init

public void init()
Readies SessionManager to be used. This object will initialize all of its internal stuff and will inform listeners that it is ready for use.

Overrides:
init in class TimedManager
See Also:
TimedManager.setRefreshRate(int)

getActiveSessions

public java.util.Collection getActiveSessions()
                                       throws java.lang.Exception
Throws:
java.lang.Exception

terminateSession

public void terminateSession(MetaMatrixSessionInfo userSessionInfo)
                      throws ExternalException,
                             AuthorizationException,
                             ComponentNotFoundException
Terminates, on remote system, the session specified by the parameter. Fires a ModelChangedEvent with message SessionManager.TERMINATE_SESSION and arg SessionToken.

Parameters:
userSessionInfo - identifies session to be terminated
Throws:
ExternalException
AuthorizationException
ComponentNotFoundException

getSessions

public java.util.Collection getSessions()
                                 throws java.lang.Exception
Throws:
java.lang.Exception

isSignedOnUserSessionValid

public boolean isSignedOnUserSessionValid()


Copyright © 2009. All Rights Reserved.