Package org.apache.catalina.session
Class ManagerBase
- java.lang.Object
-
- org.apache.catalina.session.ManagerBase
-
- All Implemented Interfaces:
Manager
- Direct Known Subclasses:
PersistentManagerBase,StandardManager
public abstract class ManagerBase extends Object implements Manager
Minimal implementation of the Manager interface that supports no session persistence or distributable capabilities. This class may be subclassed to create more sophisticated Manager implementations.- Version:
- $Revision: 1.23.2.3 $ $Date: 2008/04/17 18:37:20 $
- Author:
- Craig R. McClanahan
-
-
Field Summary
Fields Modifier and Type Field Description protected ContainercontainerThe Container with which this Manager is associated.protected intdebugThe debugging detail level for this component.protected StringdevRandomSourceprotected booleandistributableThe distributable flag for Sessions created by this Manager.protected Stringdomainprotected intduplicatesprotected StringentropyA String initialization parameter used to increase the entropy of the initialization of our random number generator.protected intexpiredSessionsNumber of sessions that have expired.protected booleaninitializedprotected static Loggerlogprotected intmaxActiveprotected ObjectmaxActiveUpdateLockprotected intmaxInactiveIntervalThe default maximum inactive interval for Sessions created by this Manager.protected static StringnameThe descriptive name of this Manager implementation (for logging).protected ObjectNameonameprotected StringrandomClassThe Java class name of the random number generator class to be used when generating session identifiers.protected DataInputStreamrandomISprotected static ResourceBundlerbprotected intrejectedSessionsNumber of times a session was not created because the maximum number of active sessions had been reached.protected intsessionAverageAliveTimeAverage time (in seconds) that expired sessions had been alive.protected intsessionCounterprotected intsessionIdLengthThe session id length of Sessions created by this Manager.protected SessionLockersessionLockerA SessionLocker used to lock sessions (curently only in the request dispatcher forward/include use case)protected intsessionMaxAliveTimeThe longest time (in seconds) that an expired session had been alive.protected Map<String,Session>sessionsThe set of currently active Sessions for this Manager, keyed by session identifier.protected PropertyChangeSupportsupportThe property change support for this component.protected UuidGeneratoruuidGeneratorThe Uuid Generator to be used when generating universally unique session identifiers.
-
Constructor Summary
Constructors Constructor Description ManagerBase()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidadd(Session session)Add this Session to the set of active Sessions for this Manager.voidaddPropertyChangeListener(PropertyChangeListener listener)Add a property change listener to this component.voidchangeSessionId(Session session)Change the session ID of the current session to a new randomly generated session ID.voidcheckSessionAttribute(String name, Object value)Checks the given session attribute name and value to make sure they comply with any restrictions set forth by this session manager.voidclearSessions()clear out the sessions cache HERCULES:addedSessioncreateEmptySession()Get a session from the recycled ones or create a new empty one.SessioncreateSession()Construct and return a new session object, based on the default settings specified by this Manager's properties.SessioncreateSession(String sessionId)Construct and return a new session object, based on the default settings specified by this Manager's properties, using the specified session id.voiddestroy()voidexpireSession(String sessionId)SessionfindSession(String id)Return the active Session, associated with this Manager, with the specified session id (if any); otherwise returnnull.SessionfindSession(String id, jakarta.servlet.http.HttpServletRequest request)Gets the session with the given id from the given request.SessionfindSession(String id, String version)Finds and returns the session with the given id that also satisfies the given version requirement.List<Session>findSessions()Return the set of active Sessions associated with this Manager.protected StringgenerateSessionId()Generate and return a new session identifier.protected StringgenerateSessionId(Object obj)Generate and return a new session identifier.intgetActiveSessions()Returns the number of active sessionsStringgetClassName()Returns the name of the implementation class.ContainergetContainer()Return the Container with which this Manager is associated.intgetDebug()Return the debugging detail level for this component.booleangetDistributable()Return the distributable flag for the sessions supported by this Manager.StringgetDomain()intgetDuplicates()Number of duplicated session IDs generated by the random source.EnginegetEngine()Retrieve the enclosing Engine for this Manager.StringgetEntropy()Return the entropy increaser value, or compute a semi-useful value if this String has not yet been set.intgetExpiredSessions()Gets the number of sessions that have expired.StringgetInfo()Return descriptive information about this Manager implementation and the corresponding version number, in the format<description>/<version>.StringgetJvmRoute()Retrieve the JvmRoute for the enclosing Engine.StringgetLastAccessedTimeMillis(String sessionId)intgetMaxActive()Max number of concurent active sessionsintgetMaxInactiveInterval()Same as getMaxInactiveIntervalSecondsintgetMaxInactiveIntervalSeconds()Return the default maximum inactive interval (in seconds) for Sessions created by this Manager.StringgetName()Return the descriptive short name of this Manager implementation.protected StandardSessiongetNewSession()Get new session class to be used in the doLoad() method.ObjectNamegetObjectName()SecureRandomgetRandom()Return the random number generator instance we should use for generating session identifiers.protected voidgetRandomBytes(byte[] bytes)StringgetRandomClass()Return the random number generator class name.StringgetRandomFile()intgetRejectedSessions()Gets the number of session creations that failed due to maxActiveSessionsStringgetSessionAttribute(String sessionId, String key)For debugging: get a session attributeintgetSessionAverageAliveTime()Same as getSessionAverageAliveTimeSecondsintgetSessionAverageAliveTimeSeconds()Gets the average time (in seconds) that expired sessions had been alive.intgetSessionCount()Total sessions created by this manager.intgetSessionCounter()Same as getSessionCountintgetSessionIdLength()Gets the session id length (in bytes) of Sessions created by this Manager.intgetSessionMaxAliveTime()Same as getSessionMaxAliveTimeSecondsintgetSessionMaxAliveTimeSeconds()Gets the longest time (in seconds) that an expired session had been alive.UuidGeneratorgetUuidGenerator()Return the UuidGenerator for this Manager.voidinit()booleanisSessionVersioningSupported()Returns true if this session manager supports session versioning, false otherwise.StringlistSessionIds()For debugging: return a list of all session ids currently activebooleanlockSession(jakarta.servlet.ServletRequest request)protected voidlog(String message)Deprecated.protected voidlog(String message, Throwable throwable)Deprecated.voidpostRequestDispatcherProcess(jakarta.servlet.ServletRequest request, jakarta.servlet.ServletResponse response)voidpreRequestDispatcherProcess(jakarta.servlet.ServletRequest request, jakarta.servlet.ServletResponse response)voidrelease()voidremove(Session session)Remove this Session from the active Sessions for this Manager.voidremovePropertyChangeListener(PropertyChangeListener listener)Remove a property change listener from this component.protected voidresetRandom()Reset the random number generator instance to null.voidsetContainer(Container container)Set the Container with which this Manager is associated.voidsetDebug(int debug)Set the debugging detail level for this component.voidsetDistributable(boolean distributable)Set the distributable flag for the sessions supported by this Manager.voidsetDuplicates(int duplicates)voidsetEntropy(String entropy)Set the entropy increaser value.voidsetExpiredSessions(int expiredSessions)Sets the number of sessions that have expired.voidsetMaxActive(int maxActive)(Re)sets the maximum number of sessions that have been active at the same time.voidsetMaxInactiveInterval(int interval)Same as setMaxInactiveIntervalSecondsvoidsetMaxInactiveIntervalSeconds(int interval)Set the default maximum inactive interval (in seconds) for Sessions created by this Manager.voidsetRandomClass(String randomClass)Set the random number generator class name.voidsetRandomFile(String s)Use /dev/random-type special device.voidsetRejectedSessions(int rejectedSessions)Sets the number of sessions that were not created because the maximum number of active sessions was reached.voidsetSessionAverageAliveTime(int sessionAverageAliveTime)Same as setSessionAverageAliveTimeSecondsvoidsetSessionAverageAliveTimeSeconds(int sessionAverageAliveTime)Sets the average time (in seconds) that expired sessions had been alive.voidsetSessionCount(int sessionCounter)Sets the total number of sessions created by this manager.voidsetSessionCounter(int sessionCounter)Same as setSessionCountvoidsetSessionIdLength(int idLength)Sets the session id length (in bytes) for Sessions created by this Manager.voidsetSessionLocker(SessionLocker sessLocker)set the pluggable sessionLocker for this manager by default it is pre-set to no-op BaseSessionLockervoidsetSessionMaxAliveTime(int sessionMaxAliveTime)Same as setSessionMaxAliveTimeSecondsvoidsetSessionMaxAliveTimeSeconds(int sessionMaxAliveTime)Sets the longest time (in seconds) that an expired session had been alive.voidsetUuidGenerator(UuidGenerator aUuidGenerator)Set the UuidGenerator for this Manager.jakarta.servlet.http.CookietoCookie(Session session)Converts the given session into a cookie as a way of persisting it.voidunlockSession(jakarta.servlet.ServletRequest request)voidupdate(jakarta.servlet.http.HttpSession session)Perform any operations when the request is finished.
-
-
-
Field Detail
-
log
protected static final Logger log
-
rb
protected static final ResourceBundle rb
-
randomIS
protected DataInputStream randomIS
-
devRandomSource
protected String devRandomSource
-
container
protected Container container
The Container with which this Manager is associated.
-
debug
protected int debug
The debugging detail level for this component.
-
distributable
protected boolean distributable
The distributable flag for Sessions created by this Manager. If this flag is set totrue, any user attributes added to a session controlled by this Manager must be Serializable.
-
entropy
protected String entropy
A String initialization parameter used to increase the entropy of the initialization of our random number generator.
-
sessionLocker
protected SessionLocker sessionLocker
A SessionLocker used to lock sessions (curently only in the request dispatcher forward/include use case)
-
maxInactiveInterval
protected int maxInactiveInterval
The default maximum inactive interval for Sessions created by this Manager.
-
sessionIdLength
protected int sessionIdLength
The session id length of Sessions created by this Manager.
-
name
protected static final String name
The descriptive name of this Manager implementation (for logging).- See Also:
- Constant Field Values
-
uuidGenerator
protected UuidGenerator uuidGenerator
The Uuid Generator to be used when generating universally unique session identifiers. HERCULES: add
-
randomClass
protected String randomClass
The Java class name of the random number generator class to be used when generating session identifiers.
-
sessionMaxAliveTime
protected int sessionMaxAliveTime
The longest time (in seconds) that an expired session had been alive.
-
sessionAverageAliveTime
protected int sessionAverageAliveTime
Average time (in seconds) that expired sessions had been alive.
-
expiredSessions
protected int expiredSessions
Number of sessions that have expired.
-
sessions
protected final Map<String,Session> sessions
The set of currently active Sessions for this Manager, keyed by session identifier.
-
sessionCounter
protected int sessionCounter
-
maxActive
protected volatile int maxActive
-
maxActiveUpdateLock
protected final Object maxActiveUpdateLock
-
duplicates
protected int duplicates
-
initialized
protected boolean initialized
-
support
protected PropertyChangeSupport support
The property change support for this component.
-
rejectedSessions
protected int rejectedSessions
Number of times a session was not created because the maximum number of active sessions had been reached.
-
domain
protected String domain
-
oname
protected ObjectName oname
-
-
Method Detail
-
getUuidGenerator
public UuidGenerator getUuidGenerator()
Return the UuidGenerator for this Manager. HERCULES:added
-
setUuidGenerator
public void setUuidGenerator(UuidGenerator aUuidGenerator)
Set the UuidGenerator for this Manager. HERCULES:added
-
getContainer
public Container getContainer()
Return the Container with which this Manager is associated.- Specified by:
getContainerin interfaceManager
-
setContainer
public void setContainer(Container container)
Set the Container with which this Manager is associated.- Specified by:
setContainerin interfaceManager- Parameters:
container- The newly associated Container
-
getDebug
public int getDebug()
Return the debugging detail level for this component.
-
setDebug
public void setDebug(int debug)
Set the debugging detail level for this component.- Parameters:
debug- The new debugging detail level
-
getClassName
public String getClassName()
Returns the name of the implementation class.
-
getDistributable
public boolean getDistributable()
Return the distributable flag for the sessions supported by this Manager.- Specified by:
getDistributablein interfaceManager
-
setDistributable
public void setDistributable(boolean distributable)
Set the distributable flag for the sessions supported by this Manager. If this flag is set, all user data objects added to sessions associated with this manager must implement Serializable.- Specified by:
setDistributablein interfaceManager- Parameters:
distributable- The new distributable flag
-
getEntropy
public String getEntropy()
Return the entropy increaser value, or compute a semi-useful value if this String has not yet been set.
-
setEntropy
public void setEntropy(String entropy)
Set the entropy increaser value.- Parameters:
entropy- The new entropy increaser value
-
getInfo
public String getInfo()
Return descriptive information about this Manager implementation and the corresponding version number, in the format<description>/<version>.
-
getMaxInactiveInterval
public int getMaxInactiveInterval()
Same as getMaxInactiveIntervalSeconds- Specified by:
getMaxInactiveIntervalin interfaceManager
-
getMaxInactiveIntervalSeconds
public int getMaxInactiveIntervalSeconds()
Return the default maximum inactive interval (in seconds) for Sessions created by this Manager.- Specified by:
getMaxInactiveIntervalSecondsin interfaceManager
-
setMaxInactiveInterval
public void setMaxInactiveInterval(int interval)
Same as setMaxInactiveIntervalSeconds- Specified by:
setMaxInactiveIntervalin interfaceManager
-
setMaxInactiveIntervalSeconds
public void setMaxInactiveIntervalSeconds(int interval)
Set the default maximum inactive interval (in seconds) for Sessions created by this Manager.- Specified by:
setMaxInactiveIntervalSecondsin interfaceManager- Parameters:
interval- The new default value
-
getSessionIdLength
public int getSessionIdLength()
Gets the session id length (in bytes) of Sessions created by this Manager.- Specified by:
getSessionIdLengthin interfaceManager- Returns:
- The session id length
-
setSessionIdLength
public void setSessionIdLength(int idLength)
Sets the session id length (in bytes) for Sessions created by this Manager.- Specified by:
setSessionIdLengthin interfaceManager- Parameters:
idLength- The session id length
-
getRejectedSessions
public int getRejectedSessions()
Gets the number of session creations that failed due to maxActiveSessions- Specified by:
getRejectedSessionsin interfaceManager- Returns:
- number of session creations that failed due to maxActiveSessions
-
setRejectedSessions
public void setRejectedSessions(int rejectedSessions)
Sets the number of sessions that were not created because the maximum number of active sessions was reached.- Specified by:
setRejectedSessionsin interfaceManager- Parameters:
rejectedSessions- Number of rejected sessions
-
getName
public String getName()
Return the descriptive short name of this Manager implementation.
-
setRandomFile
public void setRandomFile(String s)
Use /dev/random-type special device. This is new code, but may reduce the big delay in generating the random. You must specify a path to a random generator file. Use /dev/urandom for linux ( or similar ) systems. Use /dev/random for maximum security ( it may block if not enough "random" exist ). You can also use a pipe that generates random. The code will check if the file exists, and default to java Random if not found. There is a significant performance difference, very visible on the first call to getSession ( like in the first JSP ) - so use it if available.
-
getRandomFile
public String getRandomFile()
-
getRandom
public SecureRandom getRandom()
Return the random number generator instance we should use for generating session identifiers. If there is no such generator currently defined, construct and seed a new one.
-
resetRandom
protected void resetRandom()
Reset the random number generator instance to null.
-
getRandomClass
public String getRandomClass()
Return the random number generator class name.
-
setRandomClass
public void setRandomClass(String randomClass)
Set the random number generator class name.- Parameters:
randomClass- The new random number generator class name
-
getExpiredSessions
public int getExpiredSessions()
Gets the number of sessions that have expired.- Specified by:
getExpiredSessionsin interfaceManager- Returns:
- Number of sessions that have expired
-
setExpiredSessions
public void setExpiredSessions(int expiredSessions)
Sets the number of sessions that have expired.- Specified by:
setExpiredSessionsin interfaceManager- Parameters:
expiredSessions- Number of sessions that have expired
-
setSessionLocker
public void setSessionLocker(SessionLocker sessLocker)
set the pluggable sessionLocker for this manager by default it is pre-set to no-op BaseSessionLocker
-
destroy
public void destroy()
-
init
public void init()
-
add
public void add(Session session)
Add this Session to the set of active Sessions for this Manager.
-
addPropertyChangeListener
public void addPropertyChangeListener(PropertyChangeListener listener)
Add a property change listener to this component.- Specified by:
addPropertyChangeListenerin interfaceManager- Parameters:
listener- The listener to add
-
createSession
public Session createSession()
Construct and return a new session object, based on the default settings specified by this Manager's properties. The session id will be assigned by this method, and available via the getId() method of the returned session. If a new session cannot be created for any reason, returnnull. Hercules: modified- Specified by:
createSessionin interfaceManager- Throws:
IllegalStateException- if a new session cannot be instantiated for any reason
-
createSession
public Session createSession(String sessionId)
Construct and return a new session object, based on the default settings specified by this Manager's properties, using the specified session id. IMPLEMENTATION NOTE: This method must be kept in sync with the createSession method that takes no arguments.- Specified by:
createSessionin interfaceManager- Parameters:
sessionId- the session id to assign to the new session- Returns:
- the new session, or
nullif a session with the requested id already exists - Throws:
IllegalStateException- if a new session cannot be instantiated for any reason
-
createEmptySession
public Session createEmptySession()
Get a session from the recycled ones or create a new empty one. The PersistentManager manager does not need to create session data because it reads it from the Store.- Specified by:
createEmptySessionin interfaceManager
-
checkSessionAttribute
public void checkSessionAttribute(String name, Object value)
Description copied from interface:ManagerChecks the given session attribute name and value to make sure they comply with any restrictions set forth by this session manager. For example, in the case of cookie-based persistence, session attribute values must be of type String.- Specified by:
checkSessionAttributein interfaceManager- Parameters:
name- the session attribute namevalue- the session attribute value
-
findSession
public Session findSession(String id) throws IOException
Return the active Session, associated with this Manager, with the specified session id (if any); otherwise returnnull.- Specified by:
findSessionin interfaceManager- Parameters:
id- The session id for the session to be returned- Throws:
IllegalStateException- if a new session cannot be instantiated for any reasonIOException- if an input/output error occurs while processing this request
-
findSession
public Session findSession(String id, jakarta.servlet.http.HttpServletRequest request) throws IOException
Description copied from interface:ManagerGets the session with the given id from the given request.- Specified by:
findSessionin interfaceManager- Parameters:
id- the session idrequest- the request containing the requested session information- Returns:
- the requested session, or null if not found
- Throws:
IOException
-
findSession
public Session findSession(String id, String version) throws IOException
Finds and returns the session with the given id that also satisfies the given version requirement. This overloaded version of findSession() will be invoked only if isSessionVersioningSupported() returns true. By default, this method delegates to the version of findSession() that does not take any session version number.- Specified by:
findSessionin interfaceManager- Parameters:
id- The session id to matchversion- The session version requirement to satisfy- Returns:
- The session that matches the given id and also satisfies the given version requirement, or null if no such session could be found by this session manager
- Throws:
IOException- if an IO error occurred
-
isSessionVersioningSupported
public boolean isSessionVersioningSupported()
Returns true if this session manager supports session versioning, false otherwise.- Specified by:
isSessionVersioningSupportedin interfaceManager- Returns:
- true if this session manager supports session versioning, false otherwise.
-
clearSessions
public void clearSessions()
clear out the sessions cache HERCULES:added
-
findSessions
public List<Session> findSessions()
Description copied from interface:ManagerReturn the set of active Sessions associated with this Manager. If this Manager has no active Sessions, a empty list is returned.- Specified by:
findSessionsin interfaceManager- Returns:
- associated sessions
-
remove
public void remove(Session session)
Remove this Session from the active Sessions for this Manager.
-
toCookie
public jakarta.servlet.http.Cookie toCookie(Session session) throws IOException
Description copied from interface:ManagerConverts the given session into a cookie as a way of persisting it.- Specified by:
toCookiein interfaceManager- Parameters:
session- the session to convert- Returns:
- the cookie representation of the given session
- Throws:
IOException
-
removePropertyChangeListener
public void removePropertyChangeListener(PropertyChangeListener listener)
Remove a property change listener from this component.- Specified by:
removePropertyChangeListenerin interfaceManager- Parameters:
listener- The listener to remove
-
changeSessionId
public void changeSessionId(Session session)
Change the session ID of the current session to a new randomly generated session ID.- Specified by:
changeSessionIdin interfaceManager- Parameters:
session- The session to change the session ID for
-
getNewSession
protected StandardSession getNewSession()
Get new session class to be used in the doLoad() method.
-
getRandomBytes
protected void getRandomBytes(byte[] bytes)
-
generateSessionId
protected String generateSessionId(Object obj)
Generate and return a new session identifier. Hercules:added
-
generateSessionId
protected String generateSessionId()
Generate and return a new session identifier. Hercules:modified
-
getEngine
public Engine getEngine()
Retrieve the enclosing Engine for this Manager.- Returns:
- an Engine object (or null).
-
getJvmRoute
public String getJvmRoute()
Retrieve the JvmRoute for the enclosing Engine.- Returns:
- the JvmRoute or null.
-
log
protected void log(String message)
Deprecated.Log a message on the Logger associated with our Container (if any).- Parameters:
message- Message to be logged
-
log
protected void log(String message, Throwable throwable)
Deprecated.Log a message on the Logger associated with our Container (if any).- Parameters:
message- Message to be loggedthrowable- Associated exception
-
setSessionCounter
public void setSessionCounter(int sessionCounter)
Same as setSessionCount- Specified by:
setSessionCounterin interfaceManager
-
setSessionCount
public void setSessionCount(int sessionCounter)
Description copied from interface:ManagerSets the total number of sessions created by this manager.- Specified by:
setSessionCountin interfaceManager- Parameters:
sessionCounter- Total number of sessions created by this manager.
-
getSessionCounter
public int getSessionCounter()
Same as getSessionCount- Specified by:
getSessionCounterin interfaceManager
-
getSessionCount
public int getSessionCount()
Total sessions created by this manager.- Specified by:
getSessionCountin interfaceManager- Returns:
- sessions created
-
getDuplicates
public int getDuplicates()
Number of duplicated session IDs generated by the random source. Anything bigger than 0 means problems.- Returns:
-
setDuplicates
public void setDuplicates(int duplicates)
-
getActiveSessions
public int getActiveSessions()
Returns the number of active sessions- Specified by:
getActiveSessionsin interfaceManager- Returns:
- number of sessions active
-
getMaxActive
public int getMaxActive()
Max number of concurent active sessions- Specified by:
getMaxActivein interfaceManager- Returns:
-
setMaxActive
public void setMaxActive(int maxActive)
Description copied from interface:Manager(Re)sets the maximum number of sessions that have been active at the same time.- Specified by:
setMaxActivein interfaceManager- Parameters:
maxActive- Maximum number of sessions that have been active at the same time.
-
getSessionMaxAliveTime
public int getSessionMaxAliveTime()
Same as getSessionMaxAliveTimeSeconds- Specified by:
getSessionMaxAliveTimein interfaceManager
-
getSessionMaxAliveTimeSeconds
public int getSessionMaxAliveTimeSeconds()
Gets the longest time (in seconds) that an expired session had been alive.- Specified by:
getSessionMaxAliveTimeSecondsin interfaceManager- Returns:
- Longest time (in seconds) that an expired session had been alive.
-
setSessionMaxAliveTime
public void setSessionMaxAliveTime(int sessionMaxAliveTime)
Same as setSessionMaxAliveTimeSeconds- Specified by:
setSessionMaxAliveTimein interfaceManager
-
setSessionMaxAliveTimeSeconds
public void setSessionMaxAliveTimeSeconds(int sessionMaxAliveTime)
Sets the longest time (in seconds) that an expired session had been alive.- Specified by:
setSessionMaxAliveTimeSecondsin interfaceManager- Parameters:
sessionMaxAliveTime- Longest time (in seconds) that an expired session had been alive.
-
getSessionAverageAliveTime
public int getSessionAverageAliveTime()
Same as getSessionAverageAliveTimeSeconds- Specified by:
getSessionAverageAliveTimein interfaceManager
-
getSessionAverageAliveTimeSeconds
public int getSessionAverageAliveTimeSeconds()
Gets the average time (in seconds) that expired sessions had been alive.- Specified by:
getSessionAverageAliveTimeSecondsin interfaceManager- Returns:
- Average time (in seconds) that expired sessions had been alive.
-
setSessionAverageAliveTime
public void setSessionAverageAliveTime(int sessionAverageAliveTime)
Same as setSessionAverageAliveTimeSeconds- Specified by:
setSessionAverageAliveTimein interfaceManager
-
setSessionAverageAliveTimeSeconds
public void setSessionAverageAliveTimeSeconds(int sessionAverageAliveTime)
Sets the average time (in seconds) that expired sessions had been alive.- Specified by:
setSessionAverageAliveTimeSecondsin interfaceManager- Parameters:
sessionAverageAliveTime- Average time (in seconds) that expired sessions had been alive.
-
listSessionIds
public String listSessionIds()
For debugging: return a list of all session ids currently active
-
getSessionAttribute
public String getSessionAttribute(String sessionId, String key)
For debugging: get a session attribute- Parameters:
sessionId-key-- Returns:
-
expireSession
public void expireSession(String sessionId)
-
update
public void update(jakarta.servlet.http.HttpSession session) throws ExceptionPerform any operations when the request is finished.
-
getObjectName
public ObjectName getObjectName()
-
getDomain
public String getDomain()
-
postRequestDispatcherProcess
public void postRequestDispatcherProcess(jakarta.servlet.ServletRequest request, jakarta.servlet.ServletResponse response)- Specified by:
postRequestDispatcherProcessin interfaceManager
-
preRequestDispatcherProcess
public void preRequestDispatcherProcess(jakarta.servlet.ServletRequest request, jakarta.servlet.ServletResponse response)- Specified by:
preRequestDispatcherProcessin interfaceManager
-
lockSession
public boolean lockSession(jakarta.servlet.ServletRequest request) throws jakarta.servlet.ServletException- Specified by:
lockSessionin interfaceManager- Throws:
jakarta.servlet.ServletException
-
unlockSession
public void unlockSession(jakarta.servlet.ServletRequest request)
- Specified by:
unlockSessionin interfaceManager
-
release
public void release()
-
-