|
EAF 7.6 API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface SessionManager
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.
Field Summary | |
---|---|
static java.lang.String |
ENCODE_URL_ALWAYS
Indicates that url encoding of session ids is always preformed. |
static java.lang.String |
ENCODE_URL_AUTO
Indicates that url encoding of session ids is preformed only when cookies are disabled on the client browser. |
static java.lang.String |
ENCODE_URL_NEVER
Indicates that url encoding of session ids is never preformed. |
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(com.lutris.appserver.server.httpPresentation.HttpPresentationComms comms)
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. |
boolean |
getEmptySessionPath()
Return value determins whether to use empty path (/) as session cookie path attribute value! |
boolean |
getEncodeFirstUrl()
Returns the url encoding rule for the first application page (true/false). |
java.lang.String |
getEncodeUrlState()
Returns the url encoding state. |
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. |
Session |
getSession(java.lang.Thread thread,
java.lang.String sessionKey,
com.lutris.appserver.server.httpPresentation.HttpPresentationComms comms)
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. |
Field Detail |
---|
static final java.lang.String ENCODE_URL_NEVER
getEncodeUrlState()
,
Constant Field Valuesstatic final java.lang.String ENCODE_URL_ALWAYS
getEncodeUrlState()
,
Constant Field Valuesstatic final java.lang.String ENCODE_URL_AUTO
getEncodeUrlState()
,
Constant Field ValuesMethod Detail |
---|
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.
SessionException
- if the session cannot be created.Session
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
key
Session
object.
SessionException
- if the session cannot be created.Session
Session createSession(com.lutris.appserver.server.httpPresentation.HttpPresentationComms comms) throws SessionException
Session
object and an associated unique
random key. No User
object is initially associated with
the session (getUser()
returns null
).
comms
- The presentations manager comms object with all
request/response information in it.
Session
object.
SessionException
- if the session cannot be created.Session
void deleteSession(Session session) throws SessionException
session
- The session object to delete.
SessionException
- if the session cannot be deleted.void deleteSession(java.lang.String sessionKey) throws SessionException
sessionKey
- the session key.
SessionException
- if the session cannot be deleted.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.
SessionException
- if the existence of the session cannot be determined.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.
SessionException
- if the session cannot be retrieved.Session
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.
SessionException
- if the session cannot be retrieved.Session
Session getSession(java.lang.Thread thread, java.lang.String sessionKey, com.lutris.appserver.server.httpPresentation.HttpPresentationComms comms) 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.comms
- The presentations manager comms object with all
request/response information in it.sessionKey
- The String used to reference a Session
object.
Session
object is returned.
Otherwise null
is returned.
SessionException
- if the session cannot be retrieved.Session
java.util.Enumeration getSessionKeys(User user) throws SessionException
user
- The user to search for.
SessionException
- if the sessions cannot be retrieved.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.
SessionException
- if the session cannot be put into the passive state..int activeSessionCount() throws SessionException
SessionException
- if the active session count cannot be determined.int maxSessionCount()
resetMaxSessionCount()
was called. This is a historical highwater mark. If you do not implement
this feature, return -1.
java.util.Date maxSessionCountDate()
maxSessionCount()
occured.
void resetMaxSessionCount() throws SessionException
maxSessionCount()
.
The highwater mark should be reset to the current number of sessions.
SessionException
- if the max session count cannot be reset.java.util.Enumeration getSessionKeys() throws SessionException
SessionException
- if the session keys cannot be retrieved.void shutdown()
java.lang.String getEncodeUrlState()
Never
Always
Auto
boolean getEmptySessionPath()
boolean getEncodeFirstUrl()
|
EAF 7.6 API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |