org.sourcejammer.server.security
Class SessionManager

java.lang.Object
  |
  +--org.sourcejammer.server.security.SessionManager

public class SessionManager
extends java.lang.Object

Manages asynchronous user sessions by associating a session ID with a User object.


Field Summary
private  java.util.Random idGenerator
           
private  java.util.Hashtable mhshSessions
           
private  long mlSessionCounter
           
private static SessionManager moInstance
           
 
Constructor Summary
private SessionManager()
           
 
Method Summary
 void endSession(long lSessionID)
           
static SessionManager getInstance()
           
private  java.lang.Long getUniqueSessionID()
           
 User getUserForSession(long lSessionID)
           
 void removeOldSessions(long olderThanTime)
           
 long startSession(User oUser)
          Returns session ID.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

moInstance

private static SessionManager moInstance

mhshSessions

private java.util.Hashtable mhshSessions

mlSessionCounter

private long mlSessionCounter

idGenerator

private java.util.Random idGenerator
Constructor Detail

SessionManager

private SessionManager()
Method Detail

getInstance

public static SessionManager getInstance()

startSession

public long startSession(User oUser)
Returns session ID.


getUniqueSessionID

private java.lang.Long getUniqueSessionID()

getUserForSession

public User getUserForSession(long lSessionID)
                       throws NoSuchSessionException
NoSuchSessionException

endSession

public void endSession(long lSessionID)
                throws NoSuchSessionException
NoSuchSessionException

removeOldSessions

public void removeOldSessions(long olderThanTime)
                       throws NoSuchSessionException
NoSuchSessionException


Copyright 2003 Soucejammer project.