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.
version: $Revision: 1.4 $ author: Shawn McMurdo author: Mark Diekhans
getSessionKeys() Get an enumeration of all session keys.
public int
maxSessionCount() Gets the maximum number of concurent sessions that existed at any time
since this object was created, or resetMaxSessionCount()
was called.
sessionExists(String sessionKey) Returns whether the Session object associated with the
specified session key exists.
Parameters: sessionKey - The String used to reference a Session object.
public void
shutdown() Shutdown this session manager as required.
Field Detail
ENCODE_URL_ALWAYS
final public static String ENCODE_URL_ALWAYS(Code)
Indicates that url encoding of session ids is preformed only when cookies
are disabled on the client browser. This is automatically detected.
See Also:SessionManager.getEncodeUrlState
Gets the number of currently active sessions.
The number of currently active sessions. exception: SessionException - if the active session count cannot be determined.
Create a new Session object and an associated unique
random key. No User object is initially associated with
the session (getUser() returns null).
session The new Session object. exception: SessionException - if the session cannot be created. See Also:Session
Create a new Session object and an associated unique
random key. No User object is initially associated with
the session (getUser() returns null).
Parameters: ipPortToken - The base64 encoded IP and Port number to include in sessionkey session The new Session object. exception: SessionException - if the session cannot be created. See Also:Session
Create a new Session object and an associated unique
random key. No User object is initially associated with
the session (getUser() returns null).
Parameters: comms - The presentations manager comms object with allrequest/response information in it. session The new Session object. exception: SessionException - if the session cannot be created. See Also:Session
Removes a session from the session manager.
Parameters: session - The session object to delete. exception: SessionException - if the session cannot be deleted.
Returns the 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.
Parameters: sessionKey - The String used to reference a Session object. If the key is associated with an active session, then thecorresponding Session object is returned.Otherwise null is returned. See Also:Session exception: SessionException - if the session cannot be retrieved.
Returns the 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.
Parameters: thread - the thread that should be associated with the session. Onlythis thread can subsequently put the session into the passivestate. Parameters: sessionKey - The String used to reference a Session object. If the key is associated with an active session, then thecorresponding Session object is returned.Otherwise null is returned. See Also:Session exception: SessionException - if the session cannot be retrieved.
Returns the 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.
Parameters: thread - the thread that should be associated with the session. Onlythis thread can subsequently put the session into the passivestate. Parameters: comms - The presentations manager comms object with allrequest/response information in it. Parameters: sessionKey - The String used to reference a Session object. If the key is associated with an active session, then thecorresponding Session object is returned.Otherwise null is returned. See Also:Session exception: SessionException - if the session cannot be retrieved.
Lookup active sessions keys for a user. A given user may have multiple
sessions associated with it.
Parameters: user - The user to search for. An enumeration of the active sessions keys for the user. exception: SessionException - if the sessions cannot be retrieved.
Gets the maximum number of concurent sessions that existed at any time
since this object was created, or resetMaxSessionCount()
was called. This is a historical highwater mark. If you do not implement
this feature, return -1.
The highwater mark for number of sessions, or -1.
Puts a session into the 'passive' state. A 'passive' session may be made
persistent.
Parameters: thread - the thread currently associate with the the session. Parameters: sessionKey - the session key for the session that will be made persistent. exception: SessionException - if the session cannot be put into the passive state..
Reset the maximum session count. See maxSessionCount().
The highwater mark should be reset to the current number of sessions.
exception: SessionException - if the max session count cannot be reset.
Returns whether the Session object associated with the
specified session key exists.
Parameters: sessionKey - The String used to reference a Session object. If the key is associated with an active session, then returntrue, otherwise return false. exception: SessionException - if the existence of the session cannot be determined.