org.caleigo.security
Class SessionHandler

java.lang.Object
  extended byorg.caleigo.security.SessionHandler

public class SessionHandler
extends java.lang.Object

Version:
1.00
Author:
Mattias Hagstrand

Field Summary
protected  java.util.HashMap mSessions
           
 
Method Summary
 void createSession(UserInfo userInfo)
          Creates a new session and associates a session objetc with it.
protected  ISession createSession(UserInfo userInfo, int sessionID)
           
 void destroySession(int sessionID)
           
protected  int generateSessionID()
           
static SessionHandler getInstance()
           
 ISession getSession(int sessionID)
          Returns an ISessesion object for the provided session id, or null if no valid session exists.
 boolean isValidSession(UserInfo userInfo, int sessionID)
           
 void setSessionClass(java.lang.Class sessionClass)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mSessions

protected java.util.HashMap mSessions
Method Detail

getInstance

public static SessionHandler getInstance()

createSession

public void createSession(UserInfo userInfo)
Creates a new session and associates a session objetc with it.


destroySession

public void destroySession(int sessionID)

getSession

public ISession getSession(int sessionID)
Returns an ISessesion object for the provided session id, or null if no valid session exists. Note that invoker of this method should not cache the session object since it may be invalidated at any time.


isValidSession

public boolean isValidSession(UserInfo userInfo,
                              int sessionID)

setSessionClass

public void setSessionClass(java.lang.Class sessionClass)

generateSessionID

protected int generateSessionID()

createSession

protected ISession createSession(UserInfo userInfo,
                                 int sessionID)


Copyright © 2005 Caleigo. All Rights Reserved.