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<Session> getSessions()
           
 java.util.Collection<Session> getSessions(boolean refresh)
           
 void init()
          Readies SessionManager to be used.
 boolean isSignedOnUserSessionValid()
           
 void terminateSession(java.lang.String 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(java.lang.String), 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)

terminateSession

public void terminateSession(java.lang.String userSessionInfo)
                      throws ExternalException
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

getSessions

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

getSessions

public java.util.Collection<Session> getSessions(boolean refresh)
                                          throws java.lang.Exception
Throws:
java.lang.Exception

isSignedOnUserSessionValid

public boolean isSignedOnUserSessionValid()


Copyright © 2009. All Rights Reserved.