org.jaffa.presentation.portlet.session
Class SessionManager

java.lang.Object
  extended byorg.jaffa.presentation.portlet.session.SessionManager

public class SessionManager
extends Object

This class holds information about all the UserSession objects in use currently. This may be used as an administration tool.


Constructor Summary
SessionManager()
           
 
Method Summary
static void addSession(UserSession s)
          Adds a UserSession.
static UserSession getSession(String sessionId)
          Returns the UserSession object for a sessionId.
static UserSession[] getSessions()
          Returns an array of all the UserSession objects in use.
static void removeSession(UserSession s)
          Removes a UserSession.
static void startGarbageCollectionOfIdleComponents()
          This will perform garbage collection of idle components.
static void stopGarbageCollectionOfIdleComponents()
          This stops the Thread that was started by the startGarbageCollectionOfIdleComponents() method.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SessionManager

public SessionManager()
Method Detail

addSession

public static void addSession(UserSession s)
Adds a UserSession. It assigns a unique id to the UserSession before adding it to the internal cache.

Parameters:
s - The UserSession.

removeSession

public static void removeSession(UserSession s)
Removes a UserSession.

Parameters:
s - The UserSession.

getSessions

public static UserSession[] getSessions()
Returns an array of all the UserSession objects in use.

Returns:
an array of all the UserSession objects in use.

getSession

public static UserSession getSession(String sessionId)
Returns the UserSession object for a sessionId.

Parameters:
sessionId - The id identifying a UserSession.
Returns:
the UserSession object for a sessionId.

startGarbageCollectionOfIdleComponents

public static void startGarbageCollectionOfIdleComponents()
This will perform garbage collection of idle components. Idle components are those components which have had no activity performed in the last 'timeOutMinutes' minutes. This will start a Thread which runs every 'timeOutMinutes' minutes


stopGarbageCollectionOfIdleComponents

public static void stopGarbageCollectionOfIdleComponents()
This stops the Thread that was started by the startGarbageCollectionOfIdleComponents() method.



Copyright © 2002-2004 JAFFA Project.