EAF 7.4 Implementation

com.lutris.appserver.server.sessionEnhydra.persistent
Class PersistentSessionUserTable

java.lang.Object
  extended by com.lutris.appserver.server.sessionEnhydra.persistent.PersistentSessionUserTable
All Implemented Interfaces:
com.lutris.appserver.server.sessionEnhydra.StandardSessionUserTable

public class PersistentSessionUserTable
extends java.lang.Object
implements com.lutris.appserver.server.sessionEnhydra.StandardSessionUserTable

Table used by StandardSessionManager to cross reference User objects and sessions.

Version:
$Revision: 1.2 $
Author:
Kyle Clark

Constructor Summary
PersistentSessionUserTable(com.lutris.util.Config config)
           
 
Method Summary
 void add(java.lang.String sessionKey, com.lutris.appserver.server.user.User user)
          Add a session key to the user to session xref table.
 java.util.Enumeration getSessionKeys(com.lutris.appserver.server.user.User user)
          Returns the session keys associated with a particular user.
 int numSessions(com.lutris.appserver.server.user.User user)
          Get the number of sessions for a user.
 void remove(java.lang.String sessionKey)
          Remove a session from the user to session mapping table.
 void remove(java.lang.String sessionKey, com.lutris.appserver.server.user.User user)
          Remove a session from the user to session mapping table.
 void shutdown()
          Shutdown this session user table as required.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PersistentSessionUserTable

public PersistentSessionUserTable(com.lutris.util.Config config)
                           throws com.lutris.util.ConfigException
Parameters:
config - configuration options for this table - currently ignored.
Throws:
com.lutris.util.ConfigException
Method Detail

add

public void add(java.lang.String sessionKey,
                com.lutris.appserver.server.user.User user)
Add a session key to the user to session xref table.

Specified by:
add in interface com.lutris.appserver.server.sessionEnhydra.StandardSessionUserTable
Parameters:
session - The session key.
user - the user to associated with the session key.

remove

public void remove(java.lang.String sessionKey,
                   com.lutris.appserver.server.user.User user)
Remove a session from the user to session mapping table. If the session is not it the table, it is ignored.

Specified by:
remove in interface com.lutris.appserver.server.sessionEnhydra.StandardSessionUserTable
Parameters:
session - The session object, with the user already filled in.

remove

public void remove(java.lang.String sessionKey)
Remove a session from the user to session mapping table. If the session is not it the table, it is ignored.

Specified by:
remove in interface com.lutris.appserver.server.sessionEnhydra.StandardSessionUserTable
Parameters:
session - The session object, with the user already filled in.

numSessions

public int numSessions(com.lutris.appserver.server.user.User user)
                throws com.lutris.appserver.server.session.SessionException
Get the number of sessions for a user.

Specified by:
numSessions in interface com.lutris.appserver.server.sessionEnhydra.StandardSessionUserTable
Parameters:
user - The user object to check for.
Returns:
The count of the number of sessions associated with this user.
Throws:
com.lutris.appserver.server.session.SessionException - if an error occurs.

getSessionKeys

public java.util.Enumeration getSessionKeys(com.lutris.appserver.server.user.User user)
                                     throws com.lutris.appserver.server.session.SessionException
Returns the session keys associated with a particular user.

Specified by:
getSessionKeys in interface com.lutris.appserver.server.sessionEnhydra.StandardSessionUserTable
Parameters:
user - The user object to check for.
Returns:
An enumeration of the session keys associated with the user.
Throws:
com.lutris.appserver.server.session.SessionException - if an error occurs.

shutdown

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

Specified by:
shutdown in interface com.lutris.appserver.server.sessionEnhydra.StandardSessionUserTable

EAF 7.4 Implementation