|
|||||||||
| Home >> All >> com >> opencms >> [ core overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
com.opencms.core
Class CmsCoreSession

java.lang.Objectcom.opencms.core.CmsCoreSession
- All Implemented Interfaces:
- I_CmsConstants
- public class CmsCoreSession
- extends java.lang.Object
- implements I_CmsConstants
- extends java.lang.Object
This class implements a session storage which is mainly used to count the currently logged in OpenCms users.
It is required for user authentification of OpenCms. For each active user, its name and other additional information (like the current user group) are stored in a hashtable, useing the session Id as key to them.
When the session gets destroyed, the user will removed from the storage.
One of the main purposes of this stored user session list is the
sendBroadcastMessage() method.
- Version:
- $Revision: 1.10 $ $Date: 2003/01/20 17:57:49 $
| Field Summary | |
private java.util.Hashtable |
m_sessions
Hashtable storage to store all active users. |
| Constructor Summary | |
CmsCoreSession()
Constructor, creates a new CmsCoreSession object. |
|
| Method Summary | |
void |
deleteUser(java.lang.String sessionId)
Removes a user from the session storage. |
java.lang.String |
getCurrentGroup(java.lang.String sessionId)
Gets the current usergroup of a user from the session storage. |
java.lang.Integer |
getCurrentProject(java.lang.String sessionId)
Gets the current project of a user from the session storage. |
java.util.Vector |
getLoggedInUsers()
Returns a Vector with all currently logged in users. |
java.util.Hashtable |
getUser(java.lang.String sessionId)
Gets the complete user information of a user from the session storage. |
java.lang.String |
getUserName(java.lang.String sessionId)
Gets the username of a user from the session storage. |
void |
putUser(java.lang.String sessionId,
java.util.Hashtable userinfo)
Puts a new user into the sesstion storage, this method also stores a complete hashtable with additional user information. |
void |
putUser(java.lang.String sessionId,
java.lang.String username)
Puts a new user into the sesstion storage. |
void |
putUser(java.lang.String sessionId,
java.lang.String username,
java.lang.String group,
java.lang.Integer project)
Puts a new user into the sesstion storage. |
void |
sendBroadcastMessage(java.lang.String message)
Sends a broadcast message to all logged in users. |
int |
size()
Returns the number of current sessions in the system. |
java.lang.String |
toString()
Returns a string-representation for this object which can be used for debugging. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
m_sessions
private java.util.Hashtable m_sessions
- Hashtable storage to store all active users.
| Constructor Detail |
CmsCoreSession
public CmsCoreSession()
- Constructor, creates a new CmsCoreSession object.
| Method Detail |
deleteUser
public void deleteUser(java.lang.String sessionId)
- Removes a user from the session storage.
This is done when the session of the User is destroyed.
getCurrentGroup
public java.lang.String getCurrentGroup(java.lang.String sessionId)
- Gets the current usergroup of a user from the session storage.
getCurrentProject
public java.lang.Integer getCurrentProject(java.lang.String sessionId)
- Gets the current project of a user from the session storage.
getUser
public java.util.Hashtable getUser(java.lang.String sessionId)
- Gets the complete user information of a user from the session storage.
getUserName
public java.lang.String getUserName(java.lang.String sessionId)
- Gets the username of a user from the session storage.
putUser
public void putUser(java.lang.String sessionId, java.lang.String username)
- Puts a new user into the sesstion storage.
A user is stored with its current session id after a positive authentification.
putUser
public void putUser(java.lang.String sessionId, java.lang.String username, java.lang.String group, java.lang.Integer project)
- Puts a new user into the sesstion storage.
A user is stored with its current session id after a positive authentification.
putUser
public void putUser(java.lang.String sessionId, java.util.Hashtable userinfo)
- Puts a new user into the sesstion storage,
this method also stores a complete hashtable with additional
user information.
A user is stored with its current session id after a positive authentification.
size
public int size()
- Returns the number of current sessions in the system.
toString
public java.lang.String toString()
- Returns a string-representation for this object which
can be used for debugging.
getLoggedInUsers
public java.util.Vector getLoggedInUsers()
- Returns a Vector with all currently logged in users.
The Vector elements are
Hashtableswith the users name, the current project, the current group a Boolean if current messages are pending.
sendBroadcastMessage
public void sendBroadcastMessage(java.lang.String message)
- Sends a broadcast message to all logged in users.
|
|||||||||
| Home >> All >> com >> opencms >> [ core overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC
com.opencms.core.CmsCoreSession