org.caleigo.security
Class ISession.DefaultSession

java.lang.Object
  extended byorg.caleigo.security.ISession.DefaultSession
All Implemented Interfaces:
ISession
Enclosing class:
ISession

public static class ISession.DefaultSession
extends java.lang.Object
implements ISession


Nested Class Summary
 
Nested classes inherited from class org.caleigo.security.ISession
ISession.DefaultSession
 
Constructor Summary
ISession.DefaultSession(UserInfo userInfo, int sessionID)
           
 
Method Summary
 java.lang.Object getAttribute(java.lang.String key)
          This method is used to retrieve data which is stored for this session instance.
 long getCreatedTime()
          Returns the created time when this session was instantiated.
 long getLastAccessTime()
          Returns the time when this session was last accessed.
 int getSessionID()
          Returns the ID for this session instance.
 UserInfo getUserInfo()
          Returns the UserInfo corresponding to this session.
 boolean isValid()
          This method is used to check if the session is valid.
 void setAttribute(java.lang.String key, java.lang.Object attribute)
          This method is used to store session specific data.
 void updateLastAccessTime()
          Updates the time when the session was last accessed.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ISession.DefaultSession

public ISession.DefaultSession(UserInfo userInfo,
                               int sessionID)
Method Detail

getAttribute

public java.lang.Object getAttribute(java.lang.String key)
Description copied from interface: ISession
This method is used to retrieve data which is stored for this session instance.

Specified by:
getAttribute in interface ISession
Parameters:
key - the key used to identify specific data.
Returns:
The data stored for the key.

getCreatedTime

public long getCreatedTime()
Description copied from interface: ISession
Returns the created time when this session was instantiated.

Specified by:
getCreatedTime in interface ISession
Returns:
Time in milliseconds.

getLastAccessTime

public long getLastAccessTime()
Description copied from interface: ISession
Returns the time when this session was last accessed.

Specified by:
getLastAccessTime in interface ISession
Returns:
Time in millisecond.

updateLastAccessTime

public void updateLastAccessTime()
Description copied from interface: ISession
Updates the time when the session was last accessed.

Specified by:
updateLastAccessTime in interface ISession

getSessionID

public int getSessionID()
Description copied from interface: ISession
Returns the ID for this session instance.

Specified by:
getSessionID in interface ISession
Returns:
Session ID.

getUserInfo

public UserInfo getUserInfo()
Description copied from interface: ISession
Returns the UserInfo corresponding to this session.

Specified by:
getUserInfo in interface ISession
Returns:
The UserInfo.

isValid

public boolean isValid()
Description copied from interface: ISession
This method is used to check if the session is valid.

Specified by:
isValid in interface ISession
Returns:
Returns true if the session is valid.

setAttribute

public void setAttribute(java.lang.String key,
                         java.lang.Object attribute)
Description copied from interface: ISession
This method is used to store session specific data.

Specified by:
setAttribute in interface ISession
Parameters:
key - The key used to identify the data.
attribute - The data to be stored.


Copyright © 2005 Caleigo. All Rights Reserved.