EAF 7.4 API

com.lutris.appserver.server.sessionEnhydra
Interface StandardSession

All Superinterfaces:
java.io.Serializable, Session

public interface StandardSession
extends Session

Defines the interface for the Session object expected by the StandardSessionManager.

Version:
$Revision: 1.1 $
Author:
Kyle Clark

Method Summary
 javax.servlet.http.HttpSession getHttpSession()
          Expose the HttpSession interface
 long getMaxIdleTime()
          Obtain the maximum idle time for this object.
 long getMaxNoUserIdleTime()
          Obtain the maximum idle time when a User object is not associated with the session.
 long getTimeCreated()
          Obtain the creation time for this object.
 long getTimeExpires()
          Obtain the time of expiry for this object.
 long getTimeLastUsed()
          Obtain the time of last use for this object.
 void setMaxIdleTime(long maxIdleTime)
          Set the maximum idle time for this object.
 void setMaxNoUserIdleTime(long maxIdleTime)
          set the maximum idle time when a User object is not associated with the session.
 void setTimeExpires(long timeExpires)
          Set the time of expiry for this object.
 void touch()
          Set the "last used" timestamp to the current time, resetting the idle period.
 
Methods inherited from interface com.lutris.appserver.server.session.Session
clearUser, getSessionData, getSessionKey, getSessionManager, getUser, isNew, setHttpSession, setUser
 

Method Detail

touch

void touch()
Set the "last used" timestamp to the current time, resetting the idle period.


getTimeCreated

long getTimeCreated()
Obtain the creation time for this object. The time is in milliseconds since Midnight, Jan 1, 1970 (epoch).

Returns:
The creation time since epoch for this object.

getTimeLastUsed

long getTimeLastUsed()
Obtain the time of last use for this object. The time is in milliseconds since Midnight, Jan 1, 1970 (epoch).

Returns:
The time of last use since epoch for this object.

getTimeExpires

long getTimeExpires()
Obtain the time of expiry for this object. The time is in milliseconds since Midnight, Jan 1, 1970 (epoch). Returns zero (or negative) if there is no expiration date. Note: this is a maximum lifespan for the session, regardless of activity.

Returns:
The time of expiry since epoch for this object.

setTimeExpires

void setTimeExpires(long timeExpires)
Set the time of expiry for this object. The time is in milliseconds since Midnight, Jan 1, 1970 (epoch). Set this value to zero (or less) to indicate that the session does not have a maximum age.

Parameters:
timeLastUsed - The time of expiry since epoch.

getMaxIdleTime

long getMaxIdleTime()
Obtain the maximum idle time for this object. Zero (or negative) indicates that sessions may be idle indefinetly.

Returns:
The maximum number of milliseconds this session may be idle.

setMaxIdleTime

void setMaxIdleTime(long maxIdleTime)
Set the maximum idle time for this object. Set this to zero (or negative) to disable idle checking.

Parameters:
maxIdleTime - The maximum number of milliseconds this session may be idle, or zero (or negative) to allow sessions to be idle indefinetly.

getMaxNoUserIdleTime

long getMaxNoUserIdleTime()
Obtain the maximum idle time when a User object is not associated with the session. Zero (or negative) indicates that sessions may be idle indefinetly.

Returns:
The maximum number of milliseconds this session may be idle.

setMaxNoUserIdleTime

void setMaxNoUserIdleTime(long maxIdleTime)
set the maximum idle time when a User object is not associated with the session. Set this to zero (or negative) to disable idle checking.

Parameters:
maxIdleTime - The maximum number of milliseconds this session may be idle.

getHttpSession

javax.servlet.http.HttpSession getHttpSession()
Expose the HttpSession interface

Specified by:
getHttpSession in interface Session

EAF 7.4 API