|
EAF 7.6 Implementation | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.lutris.appserver.server.sessionContainerAdapter.ContainerAdapterSessionManager
public class ContainerAdapterSessionManager
Description:
Simple session manager to be used with servlet container capable of managing their sessions. Uses HttpSession to keep the session data. The sessions are completely managed by the session container. To use this class as a session manager, enter it as a value of the SessionManager.Class in the config file of the application - e.g. SessionManager.Class = com.lutris.appserver.server.sessionContainerAdapter.ContainerAdapterSessionManager
Field Summary | |
---|---|
static java.lang.String |
CFG_ENCODE_FIRST_URL
Url encoding for first page state (to force it or not) CFG_ENCODE_URL_STATE must not be set to NEVER for this parameter to take efect |
static java.lang.String |
CFG_ENCODE_URL_STATE
The name of the config variable for the url encoding state |
protected static java.lang.String |
defaultEncodeUrlState
Indicates url encoding status. |
protected static int |
defaultMaxSessionIdleTime
Default maximum session idle time, in seconds. |
protected boolean |
encodeFirstUrl
Url encoding for first page state (force it or not) |
protected java.lang.String |
encodeUrlState
The url encoding state. |
protected int |
maxSessionIdleTime
Maximum session idle time, in seconds. |
protected java.lang.String |
SESSION
Name of the session object in the HttpSession |
Fields inherited from interface com.lutris.appserver.server.session.SessionManager |
---|
ENCODE_URL_ALWAYS, ENCODE_URL_AUTO, ENCODE_URL_NEVER |
Constructor Summary | |
---|---|
ContainerAdapterSessionManager(com.lutris.appserver.server.Application application,
com.lutris.util.Config config,
com.lutris.logging.LogChannel logger)
|
Method Summary | |
---|---|
int |
activeSessionCount()
Not implemented, since this session manager doesn't really control the sessions - they are managed by the servlet container |
com.lutris.appserver.server.session.Session |
createSession()
Creates a new session |
com.lutris.appserver.server.session.Session |
createSession(HttpPresentationComms comms)
Extracts the SessionId from the httpSession and creates a newSession object with that Id |
com.lutris.appserver.server.session.Session |
createSession(java.lang.String ipport)
Not implemented - backward compatibility with the API specification |
void |
deleteSession(com.lutris.appserver.server.session.Session parm1)
Not implemented, since this session manager doesn't really control the sessions - they are managed by the servlet container |
void |
deleteSession(java.lang.String parm1)
Not implemented, since this session manager doesn't really control the sessions - they are managed by the servlet container |
boolean |
getEmptySessionPath()
Not used for container adapter session management scenario! Container itself should take care about this. |
boolean |
getEncodeFirstUrl()
Returns the url encoding rule for the first application page (true/false). |
java.lang.String |
getEncodeUrlState()
|
com.lutris.appserver.server.session.Session |
getSession(java.lang.String sessionId)
Not implemented, since the sessions are kept at the container side |
com.lutris.appserver.server.session.Session |
getSession(java.lang.String sessionId,
HttpPresentationComms comms)
Returns teh session object corresponding to the HttpPresentationComms |
com.lutris.appserver.server.session.Session |
getSession(java.lang.String sessionId,
javax.servlet.http.HttpServletRequest servletRequest)
returns the session object contained in the HttpServletRequest |
com.lutris.appserver.server.session.Session |
getSession(java.lang.Thread parm1,
java.lang.String sessionId)
Not implemented, needed for the compatibility with the API specification |
com.lutris.appserver.server.session.Session |
getSession(java.lang.Thread parm1,
java.lang.String sessionId,
HttpPresentationComms comms)
Returns teh session object corresponding to the HttpPresentationComms |
java.util.Enumeration |
getSessionKeys()
Not implemented, this information is kept at the servlet container side |
java.util.Enumeration |
getSessionKeys(com.lutris.appserver.server.user.User parm1)
Not implemented, this information is kept at the servlet container side |
int |
maxSessionCount()
Not implemented, this information is kept at the servlet container side |
java.util.Date |
maxSessionCountDate()
Not implemented |
void |
passivateSession(java.lang.Thread parm1,
java.lang.String parm2)
Not implemented, since this session manager doesn't really control the sessions - they are managed by the servlet container |
void |
resetMaxSessionCount()
Not implemented, since this session manager doesn't really control the sessions - they are managed by the servlet container |
boolean |
sessionExists(java.lang.String sessionId)
|
void |
shutdown()
NOP |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static java.lang.String defaultEncodeUrlState
Never
indicates urls are never encoded with session keys.
This indicates that session cookies have to be used or no session state
can be maintained.Always
indicates that urls are always encoded with session
keys. Session cookies are never used.Auto
indicates that session cookies will be if available.
If not, urls will automatically be encoded.
getEncodeUrlState()
public static final java.lang.String CFG_ENCODE_URL_STATE
public static final java.lang.String CFG_ENCODE_FIRST_URL
protected java.lang.String encodeUrlState
Never
Always
Auto
.
protected java.lang.String SESSION
protected static int defaultMaxSessionIdleTime
SessionManager
may override this value to use the default expiration logic or override
isSessionExpired
to define custom expiration logic. A
value less-than or equal to zero disables idle checking. Default value is
30 minutes.
#getMaxSessionIdleTime
protected int maxSessionIdleTime
#getMaxSessionIdleTime
protected boolean encodeFirstUrl
Constructor Detail |
---|
public ContainerAdapterSessionManager(com.lutris.appserver.server.Application application, com.lutris.util.Config config, com.lutris.logging.LogChannel logger) throws com.lutris.appserver.server.session.SessionException
application
- application that uses this session managerconfig
- the application config objectlogger
- logger, ignored, since some common loggers are not serilizable
com.lutris.appserver.server.session.SessionException
Method Detail |
---|
public com.lutris.appserver.server.session.Session createSession() throws com.lutris.appserver.server.session.SessionException
createSession
in interface com.lutris.appserver.server.session.SessionManager
com.lutris.appserver.server.session.SessionException
public com.lutris.appserver.server.session.Session createSession(java.lang.String ipport) throws com.lutris.appserver.server.session.SessionException
createSession
in interface com.lutris.appserver.server.session.SessionManager
ipport
-
com.lutris.appserver.server.session.SessionException
public com.lutris.appserver.server.session.Session createSession(HttpPresentationComms comms) throws com.lutris.appserver.server.session.SessionException
createSession
in interface com.lutris.appserver.server.session.SessionManager
comms
- HttpPresentationComms that containes the HttpServletRequest
com.lutris.appserver.server.session.SessionException
public void deleteSession(com.lutris.appserver.server.session.Session parm1) throws com.lutris.appserver.server.session.SessionException
deleteSession
in interface com.lutris.appserver.server.session.SessionManager
parm1
-
com.lutris.appserver.server.session.SessionException
public void deleteSession(java.lang.String parm1) throws com.lutris.appserver.server.session.SessionException
deleteSession
in interface com.lutris.appserver.server.session.SessionManager
parm1
-
com.lutris.appserver.server.session.SessionException
public boolean sessionExists(java.lang.String sessionId) throws com.lutris.appserver.server.session.SessionException
sessionExists
in interface com.lutris.appserver.server.session.SessionManager
sessionId
-
com.lutris.appserver.server.session.SessionException
public com.lutris.appserver.server.session.Session getSession(java.lang.String sessionId) throws com.lutris.appserver.server.session.SessionException
getSession
in interface com.lutris.appserver.server.session.SessionManager
sessionId
-
com.lutris.appserver.server.session.SessionException
public com.lutris.appserver.server.session.Session getSession(java.lang.String sessionId, javax.servlet.http.HttpServletRequest servletRequest) throws com.lutris.appserver.server.session.SessionException
sessionId
- -
ignored, kept for the backward compatibilityservletRequest
- HttpServletRequest from which the session is extracted
com.lutris.appserver.server.session.SessionException
public com.lutris.appserver.server.session.Session getSession(java.lang.String sessionId, HttpPresentationComms comms) throws com.lutris.appserver.server.session.SessionException
sessionId
- ignored, kept for the backward compatibilitycomms
- HttpPresentationComms object that contains HttpServletRequest
from which the session is extracted
com.lutris.appserver.server.session.SessionException
public com.lutris.appserver.server.session.Session getSession(java.lang.Thread parm1, java.lang.String sessionId, HttpPresentationComms comms) throws com.lutris.appserver.server.session.SessionException
getSession
in interface com.lutris.appserver.server.session.SessionManager
parm1
- ignoredsessionId
- ignoredcomms
- HttpPresentationComms object that contains HttpServletRequest
from which the session is extracted
com.lutris.appserver.server.session.SessionException
public com.lutris.appserver.server.session.Session getSession(java.lang.Thread parm1, java.lang.String sessionId) throws com.lutris.appserver.server.session.SessionException
getSession
in interface com.lutris.appserver.server.session.SessionManager
parm1
- sessionId
-
com.lutris.appserver.server.session.SessionException
public java.util.Enumeration getSessionKeys(com.lutris.appserver.server.user.User parm1) throws com.lutris.appserver.server.session.SessionException
getSessionKeys
in interface com.lutris.appserver.server.session.SessionManager
parm1
-
com.lutris.appserver.server.session.SessionException
public void passivateSession(java.lang.Thread parm1, java.lang.String parm2) throws com.lutris.appserver.server.session.SessionException
passivateSession
in interface com.lutris.appserver.server.session.SessionManager
parm1
- parm2
-
com.lutris.appserver.server.session.SessionException
public int activeSessionCount() throws com.lutris.appserver.server.session.SessionException
activeSessionCount
in interface com.lutris.appserver.server.session.SessionManager
com.lutris.appserver.server.session.SessionException
public int maxSessionCount()
maxSessionCount
in interface com.lutris.appserver.server.session.SessionManager
public java.util.Date maxSessionCountDate()
maxSessionCountDate
in interface com.lutris.appserver.server.session.SessionManager
public void resetMaxSessionCount() throws com.lutris.appserver.server.session.SessionException
resetMaxSessionCount
in interface com.lutris.appserver.server.session.SessionManager
com.lutris.appserver.server.session.SessionException
public java.util.Enumeration getSessionKeys() throws com.lutris.appserver.server.session.SessionException
getSessionKeys
in interface com.lutris.appserver.server.session.SessionManager
com.lutris.appserver.server.session.SessionException
public void shutdown()
shutdown
in interface com.lutris.appserver.server.session.SessionManager
public java.lang.String getEncodeUrlState()
getEncodeUrlState
in interface com.lutris.appserver.server.session.SessionManager
public boolean getEmptySessionPath()
getEmptySessionPath
in interface com.lutris.appserver.server.session.SessionManager
public boolean getEncodeFirstUrl()
getEncodeFirstUrl
in interface com.lutris.appserver.server.session.SessionManager
|
EAF 7.6 Implementation | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |