|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.opencms.main.CmsSessionInfo
public class 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 java.lang.String |
ATTRIBUTE_SESSION_ID
Name of the http session attribute the OpenCms session id is stored in. |
static int |
QUEUE_SIZE
Maximum size of the broadcast queue for one user. |
Constructor Summary | |
---|---|
CmsSessionInfo(CmsRequestContext context,
CmsUUID 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. |
boolean |
equals(java.lang.Object obj)
|
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. |
java.lang.String |
getOrganizationalUnitFqn()
Returns the fully qualified name of the organizational unit for this session. |
CmsUUID |
getProject()
Returns the id of the project of the user. |
CmsUUID |
getSessionId()
Returns the id of the OpenCms (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 milliseconds, 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. |
CmsUUID |
getUserId()
Returns the id of the user to which this session info belongs. |
int |
hashCode()
|
boolean |
isExpired()
Returns true if this session info has expired, that
is it has not been updated in the time set by the maximum inactivity interval. |
protected void |
setProject(CmsUUID projectId)
Sets the id of the current project of the user of this session info. |
java.lang.String |
toString()
|
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, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String ATTRIBUTE_SESSION_ID
public static final int QUEUE_SIZE
Constructor Detail |
---|
public CmsSessionInfo(CmsRequestContext context, CmsUUID sessionId, int maxInactiveInterval)
context
- the user context to create this session info forsessionId
- OpenCms 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 boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
Object.equals(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 java.lang.String getOrganizationalUnitFqn()
public CmsUUID getProject()
public CmsUUID getSessionId()
HttpSession.getId()
public java.lang.String getSiteRoot()
public long getTimeActive()
public long getTimeCreated()
public long getTimeUpdated()
public CmsUUID getUserId()
public int hashCode()
hashCode
in class java.lang.Object
Object.hashCode()
public boolean isExpired()
true
if this session info has expired, that
is it has not been updated in the time set by the maximum inactivity interval.
true
if this session info has expiredpublic java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
protected void setProject(CmsUUID projectId)
projectId
- the project id to setprotected void update(CmsRequestContext context)
context
- the request context to update the session with
|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |