|
Enhydra 3.1 API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
The session management object interface. This class implementing this interface manage the session state for currently active users of one or more applications. It allocates sessions and maintains the mapping between session keys and Session objects.
Method Summary | |
int |
activeSessionCount()
Gets the number of currently active sessions. |
Session |
createSession()
Create a new Session object and an associated unique
random key. |
Session |
createSession(java.lang.String ipPortToken)
Create a new Session object and an associated unique
random key. |
void |
deleteSession(Session session)
Removes a session from the session manager. |
void |
deleteSession(java.lang.String sessionKey)
Removes a session from the manager. |
Session |
getSession(java.lang.String sessionKey)
Returns the Session object associated with the
specified session key. |
Session |
getSession(java.lang.Thread thread,
java.lang.String sessionKey)
Returns the Session object associated with the
specified session key. |
java.util.Enumeration |
getSessionKeys()
Get an enumeration of all session keys. |
java.util.Enumeration |
getSessionKeys(User user)
Lookup active sessions keys for a user. |
int |
maxSessionCount()
Gets the maximum number of concurent sessions that existed at any time since this object was created, or resetMaxSessionCount() was called. |
java.util.Date |
maxSessionCountDate()
Gets the time when the maximum refered to by maxSessionCount() occured. |
void |
passivateSession(java.lang.Thread thread,
java.lang.String sessionKey)
Puts a session into the 'passive' state. |
void |
resetMaxSessionCount()
Reset the maximum session count. |
boolean |
sessionExists(java.lang.String sessionKey)
Returns whether the Session object associated with
the specified session key exists. |
void |
shutdown()
Shutdown this session manager as required. |
Method Detail |
public Session createSession() throws SessionException
Session
object and an associated unique
random key. No User
object is initially associated with
the session (getUser()
returns null
).Session
object.Session
public Session createSession(java.lang.String ipPortToken) throws SessionException
Session
object and an associated unique
random key. No User
object is initially associated with
the session (getUser()
returns null
).ipPortToken
- The base64 encoded IP and Port number to include in session keySession
object.Session
public void deleteSession(Session session) throws SessionException
session
- The session object to delete.public void deleteSession(java.lang.String sessionKey) throws SessionException
sessionKey
- the session key.public boolean sessionExists(java.lang.String sessionKey) throws SessionException
Session
object associated with
the specified session key exists.sessionKey
- The String used to reference a Session
object.public Session getSession(java.lang.String sessionKey) throws SessionException
Session
object associated with the
specified session key. The session is put in the 'active'
state. If no Session
object is
associated with the key then this method returns null
.sessionKey
- The String used to reference a
Session
object.Session
object is
returned. Otherwise null
is returned.Session
public Session getSession(java.lang.Thread thread, java.lang.String sessionKey) throws SessionException
Session
object associated with the
specified session key. The session is put in the 'active'
state. If no Session
object is
associated with the key then this method returns null
.thread
- the thread that should be associated with
the session. Only this thread can subsequently
put the session into the passive state.sessionKey
- The String used to reference a
Session
object.Session
object is
returned. Otherwise null
is returned.Session
public java.util.Enumeration getSessionKeys(User user) throws SessionException
user
- The user to search for.public void passivateSession(java.lang.Thread thread, java.lang.String sessionKey) throws SessionException
thread
- the thread currently associate with the
the session.sessionKey
- the session key for the session
that will be made persistent.public int activeSessionCount() throws SessionException
public int maxSessionCount()
resetMaxSessionCount()
was called.
This is a historical highwater mark.
If you do not implement this feature, return -1.public java.util.Date maxSessionCountDate()
maxSessionCount()
occured.public void resetMaxSessionCount() throws SessionException
maxSessionCount()
.
The highwater mark should be reset to the current number of sessions.public java.util.Enumeration getSessionKeys() throws SessionException
public void shutdown()
|
Enhydra 3.1 API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |