org.caleigo.security
Interface ISession

All Known Implementing Classes:
ISession.DefaultSession

public interface ISession

Interface for session classes

Author:
tobias

Nested Class Summary
static class ISession.DefaultSession
           
 
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.
 

Method Detail

getSessionID

public int getSessionID()
Returns the ID for this session instance.

Returns:
Session ID.

getUserInfo

public UserInfo getUserInfo()
Returns the UserInfo corresponding to this session.

Returns:
The UserInfo.

getCreatedTime

public long getCreatedTime()
Returns the created time when this session was instantiated.

Returns:
Time in milliseconds.

getLastAccessTime

public long getLastAccessTime()
Returns the time when this session was last accessed.

Returns:
Time in millisecond.

updateLastAccessTime

public void updateLastAccessTime()
Updates the time when the session was last accessed.


isValid

public boolean isValid()
This method is used to check if the session is valid.

Returns:
Returns true if the session is valid.

getAttribute

public java.lang.Object getAttribute(java.lang.String key)
This method is used to retrieve data which is stored for this session instance.

Parameters:
key - the key used to identify specific data.
Returns:
The data stored for the key.

setAttribute

public void setAttribute(java.lang.String key,
                         java.lang.Object attribute)
This method is used to store session specific data.

Parameters:
key - The key used to identify the data.
attribute - The data to be stored.


Copyright © 2005 Caleigo. All Rights Reserved.