| java.lang.Object com.lutris.appserver.server.sessionEnhydra.BasicSession
All known Subclasses: com.lutris.appserver.server.sessionEnhydra.PagedSession,
BasicSession | public class BasicSession implements StandardSession,HttpSession,Serializable(Code) | | The standard implementation of the StandardSession interface.
The session reflects and instance of a client interacting
with the application. A BasicSession maybe associated
with a user or exist in a unauthenticated state. The
session manager associated with a BasicSession object must be
a StandardSessionManager or a derivation.
version: $Revision: 1.3 $ author: John Marco author: Shawn McMurdo |
BasicSession | public BasicSession()(Code) | | Need the following constructor in order to serialize?
|
BasicSession | protected BasicSession(StandardSessionManager sessionManager, String sessionKey)(Code) | | Construct a new session. Only called by
StandardSessionManager .
Parameters: sessionManager - The session manager that will manager this session. Parameters: sessionKey - The unique session key associated with the session. |
BasicSession | protected BasicSession(StandardSessionManager sessionManager, String sessionKey, SessionData sessionData)(Code) | | Construct a new session. Only called by
StandardSessionManager .
Parameters: sessionManager - The session manager that will manager this session. Parameters: sessionKey - The unique session key associated with the session. Parameters: sessionData - The session data to associate with this session. |
clearUser | public void clearUser() throws SessionException(Code) | | Remove the user association with this session. This will unregister the
user with the SessionManager .
exception: SessionException - if an error occurs. |
decrementRefCount | public int decrementRefCount()(Code) | | Returns the number of active references to this object.
the number of references. |
getCreationTime | public long getCreationTime()(Code) | | |
getLastAccessedTime | public long getLastAccessedTime()(Code) | | |
getMaxIdleTime | public long getMaxIdleTime()(Code) | | Obtain the maximum idle time for this object. Zero (or negative)
indicates that sessions may be idle indefinetly.
The maximum number of milliseconds this sessionmay be idle. |
getMaxInactiveInterval | public int getMaxInactiveInterval()(Code) | | |
getMaxNoUserIdleTime | public long getMaxNoUserIdleTime()(Code) | | 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.
The maximum number of milliseconds this sessionmay be idle. |
getRefCount | public int getRefCount()(Code) | | Returns the number of active references to this object.
the number of references. |
getSessionData | public SessionData getSessionData()(Code) | | Obtain the application specific data for this session.
A SessionData object containing application specificdata for this session. |
getSessionKey | public String getSessionKey()(Code) | | Obtain the unique key associated with this session.
A String containing the key for this session. |
getSessionManager | public SessionManager getSessionManager()(Code) | | Obtain the session manager associated with this session.
The session manager object. |
getTimeCreated | public long getTimeCreated()(Code) | | Obtain the creation time for this object. The time is in
milliseconds since Midnight, Jan 1, 1970 (epoch).
The creation time since epoch for this object. |
getTimeExpires | public long getTimeExpires()(Code) | | 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.
The time of expiry since epoch for this object. |
getTimeLastUsed | public long getTimeLastUsed()(Code) | | Obtain the time of last use for this object. The time is in
milliseconds since Midnight, Jan 1, 1970 (epoch).
The time of last use since epoch for this object. |
getUser | public User getUser()(Code) | | Obtain the user associated with this session.
The user object or null if thesession is not logged in. |
incrementRefCount | public int incrementRefCount()(Code) | | Returns the number of active references to this object.
the number of references. |
invalidate | public void invalidate()(Code) | | |
isNew | public boolean isNew()(Code) | | Returns true if the session is new. A session is new if it has
been created but a client cookie was never used to reference it.
In other words, the cookie associated with the session was
never submitted by a client.
true if the session is new. |
removeAttribute | public void removeAttribute(String name)(Code) | | |
setMaxIdleTime | public void setMaxIdleTime(long maxIdleTime)(Code) | | 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 thissession may be idle, or zero (or negative) to allow sessions to be idleindefinetly. |
setMaxInactiveInterval | public void setMaxInactiveInterval(int interval)(Code) | | |
setMaxNoUserIdleTime | public void setMaxNoUserIdleTime(long maxIdleTime)(Code) | | 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 thissession may be idle. |
setTimeExpires | public void setTimeExpires(long timeExpires)(Code) | | 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. |
setUser | public void setUser(User sessionUser) throws SessionException(Code) | | Set the user associated with this session. This will register the
user with the SessionManager .
If it is neccessary to prevent a user from logging on multiple times,
this can be accomplished by synchronizing on the
Sessionmanager object and enquiring about the number of
users associated with a session. It is then possible to delete other
sessions before adding a new session.
Parameters: user - the user object to associate with the session. exception: SessionException - if the user cannot be associated with the session. |
toString | public String toString()(Code) | | Prints a string representation of this object.
the string representation. |
touch | public void touch()(Code) | | Set the "last used" timestamp to the current time, resetting the
idle period.
|
|
|