|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecthelma.framework.core.SessionManager
public class SessionManager
Field Summary | |
---|---|
protected Application |
app
|
protected java.util.Hashtable |
sessions
|
Constructor Summary | |
---|---|
SessionManager()
|
Method Summary | |
---|---|
protected long |
cleanupSessions(long lastSessionCleanup)
Purge sessions that have not been used for a certain amount of time. |
int |
countSessions()
Returns the number of currenty active sessions. |
Session |
createSession(java.lang.String sessionId)
|
void |
discardSession(Session session)
Remove the session from the sessions-table and logout the user. |
java.util.List |
getActiveUsers()
Return a list of Helma nodes (HopObjects - the database object representing the user, not the session object) representing currently logged in users. |
Session |
getSession(java.lang.String sessionId)
|
java.util.Map |
getSessions()
Return the whole session map. |
java.util.List |
getSessionsForUsername(java.lang.String username)
Return an array of SessionBean objects currently associated with a given
Helma user. |
void |
init(Application app)
|
void |
loadSessionData(java.io.File f,
ScriptingEngine engine)
loads the serialized session table from a given file or from dbdir/sessions |
boolean |
loginSession(java.lang.String uname,
java.lang.String password,
Session session)
Deprecated. |
void |
logoutSession(Session session)
Deprecated. |
void |
shutdown()
|
void |
storeSessionData(java.io.File f,
ScriptingEngine engine)
Dump session state to a file. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.util.Hashtable sessions
protected Application app
Constructor Detail |
---|
public SessionManager()
Method Detail |
---|
public void init(Application app)
public void shutdown()
public Session createSession(java.lang.String sessionId)
public Session getSession(java.lang.String sessionId)
public java.util.Map getSessions()
public int countSessions()
public void discardSession(Session session)
public boolean loginSession(java.lang.String uname, java.lang.String password, Session session)
public void logoutSession(Session session)
public java.util.List getSessionsForUsername(java.lang.String username)
SessionBean
objects currently associated with a given
Helma user.
public java.util.List getActiveUsers()
public void storeSessionData(java.io.File f, ScriptingEngine engine)
f
- the file to write session into, or null to use the default sesssion store.public void loadSessionData(java.io.File f, ScriptingEngine engine)
protected long cleanupSessions(long lastSessionCleanup)
lastSessionCleanup
- the last time sessions were purged
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |