Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.lutris.appserver.server.session
Interface SessionManager  view SessionManager download SessionManager.java

All Known Implementing Classes:
StandardSessionManager

public interface SessionManager

The session management object interface. This class implementing this interface manage the session state for currently active users of one or more applications. It allocates sessions and maintains the mapping between session keys and Session objects.

Version:
$Revision: 1.19.14.1 $

Method Summary
 int activeSessionCount()
          Gets the number of currently active sessions.
 Session createSession()
          Create a new Session object and an associated unique random key.
 Session createSession(java.lang.String ipPortToken)
          Create a new Session object and an associated unique random key.
 void deleteSession(Session session)
          Removes a session from the session manager.
 void deleteSession(java.lang.String sessionKey)
          Removes a session from the manager.
 Session getSession(java.lang.String sessionKey)
          Returns the Session object associated with the specified session key.
 Session getSession(java.lang.Thread thread, java.lang.String sessionKey)
          Returns the Session object associated with the specified session key.
 java.util.Enumeration getSessionKeys()
          Get an enumeration of all session keys.
 java.util.Enumeration getSessionKeys(com.lutris.appserver.server.user.User user)
          Lookup active sessions keys for a user.
 int maxSessionCount()
          Gets the maximum number of concurent sessions that existed at any time since this object was created, or resetMaxSessionCount() was called.
 java.util.Date maxSessionCountDate()
          Gets the time when the maximum refered to by maxSessionCount() occured.
 void passivateSession(java.lang.Thread thread, java.lang.String sessionKey)
          Puts a session into the 'passive' state.
 void resetMaxSessionCount()
          Reset the maximum session count.
 boolean sessionExists(java.lang.String sessionKey)
          Returns whether the Session object associated with the specified session key exists.
 void shutdown()
          Shutdown this session manager as required.
 

Method Detail

createSession

public Session createSession()
                      throws SessionException
Create a new Session object and an associated unique random key. No User object is initially associated with the session (getUser() returns null).


createSession

public Session createSession(java.lang.String ipPortToken)
                      throws SessionException
Create a new Session object and an associated unique random key. No User object is initially associated with the session (getUser() returns null).


deleteSession

public void deleteSession(Session session)
                   throws SessionException
Removes a session from the session manager.


deleteSession

public void deleteSession(java.lang.String sessionKey)
                   throws SessionException
Removes a session from the manager.


sessionExists

public boolean sessionExists(java.lang.String sessionKey)
                      throws SessionException
Returns whether the Session object associated with the specified session key exists.


getSession

public Session getSession(java.lang.String sessionKey)
                   throws SessionException
Returns the Session object associated with the specified session key. The session is put in the 'active' state. If no Session object is associated with the key then this method returns null.


getSession

public Session getSession(java.lang.Thread thread,
                          java.lang.String sessionKey)
                   throws SessionException
Returns the Session object associated with the specified session key. The session is put in the 'active' state. If no Session object is associated with the key then this method returns null.


getSessionKeys

public java.util.Enumeration getSessionKeys(com.lutris.appserver.server.user.User user)
                                     throws SessionException
Lookup active sessions keys for a user. A given user may have multiple sessions associated with it.


passivateSession

public void passivateSession(java.lang.Thread thread,
                             java.lang.String sessionKey)
                      throws SessionException
Puts a session into the 'passive' state. A 'passive' session may be made persistent.


activeSessionCount

public int activeSessionCount()
                       throws SessionException
Gets the number of currently active sessions.


maxSessionCount

public int maxSessionCount()
Gets the maximum number of concurent sessions that existed at any time since this object was created, or resetMaxSessionCount() was called. This is a historical highwater mark. If you do not implement this feature, return -1.


maxSessionCountDate

public java.util.Date maxSessionCountDate()
Gets the time when the maximum refered to by maxSessionCount() occured.


resetMaxSessionCount

public void resetMaxSessionCount()
                          throws SessionException
Reset the maximum session count. See maxSessionCount(). The highwater mark should be reset to the current number of sessions.


getSessionKeys

public java.util.Enumeration getSessionKeys()
                                     throws SessionException
Get an enumeration of all session keys.


shutdown

public void shutdown()
Shutdown this session manager as required. The session manager should not be used after this method has been called