|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.opencms.main.CmsSessionInfo
Stores information about a user that has authenticated himself the OpenCms security system.
This object is used to provide information about all authenticated users in the system
with the CmsSessionManager
.
This object is available for all authenticated users after login. If a user has not logged in, he may have a session on the servlet engine, but he will have no session info object attached. For example the "Guest" user may have multiple sessions, but no session info is created for him.
Field Summary | |
static int |
QUEUE_SIZE
Maximum size of the broadcast queue for one user. |
Constructor Summary | |
CmsSessionInfo(CmsRequestContext context,
java.lang.String sessionId,
int maxInactiveInterval)
Creates a new CmsSessionInfo object. |
Method Summary | |
int |
compareTo(java.lang.Object obj)
Allows sorting session info according to the user names. |
org.apache.commons.collections.Buffer |
getBroadcastQueue()
Returns the broadcast queue of the user to which this session info belongs. |
int |
getMaxInactiveInterval()
Returns the maximum time, in seconds, this session info is allowed to be inactive. |
int |
getProject()
Returns the id of the project of the user. |
java.lang.String |
getSessionId()
Returns the id of the (http) session this session info belongs to. |
java.lang.String |
getSiteRoot()
Returns the current site root of the user. |
long |
getTimeActive()
Returns the time, in miliseconds, this session has been active, that is the time of the last update minus the creation time. |
long |
getTimeCreated()
Returns the time this session info was created. |
long |
getTimeUpdated()
Returns the time this session info was last updated. |
CmsUser |
getUser()
Returns the user to which this session info belongs. |
boolean |
isExpired()
Returns true if this session info has expired, that
is it has not been updated in the time set by the maximum inactivitiy interval. |
void |
setProject(int projectId)
Sets the id of the current project of the user of this session info. |
protected void |
update(CmsRequestContext context)
Updates the session info object with the information from the given request context. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int QUEUE_SIZE
Constructor Detail |
public CmsSessionInfo(CmsRequestContext context, java.lang.String sessionId, int maxInactiveInterval)
context
- the user context to create this session info forsessionId
- id of the (http) session this session info belongs tomaxInactiveInterval
- the maximum time, in seconds, this session info is allowed to be inactiveMethod Detail |
public int compareTo(java.lang.Object obj)
compareTo
in interface java.lang.Comparable
Comparable.compareTo(java.lang.Object)
public org.apache.commons.collections.Buffer getBroadcastQueue()
public int getMaxInactiveInterval()
The inactive time is the time since the last call to the update(CmsRequestContext)
method. If the inactive time is greater then the maximum allowed time, this
session info will be removed from the session manager.
HttpSession.getMaxInactiveInterval()
public int getProject()
public java.lang.String getSessionId()
HttpSession.getId()
public java.lang.String getSiteRoot()
public long getTimeActive()
public long getTimeCreated()
public long getTimeUpdated()
public CmsUser getUser()
public boolean isExpired()
true
if this session info has expired, that
is it has not been updated in the time set by the maximum inactivitiy interval.
true
if this session info has expiredpublic void setProject(int projectId)
projectId
- the project id to setprotected void update(CmsRequestContext context)
context
- the requrest context to update the session with
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |