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 Container
container
The Container with which this Manager is associated.protected int
debug
The debugging detail level for this component.protected String
devRandomSource
protected boolean
distributable
The distributable flag for Sessions created by this Manager.protected String
domain
protected int
duplicates
protected String
entropy
A String initialization parameter used to increase the entropy of the initialization of our random number generator.protected int
expiredSessions
Number of sessions that have expired.protected boolean
initialized
protected static Logger
log
protected int
maxActive
protected Object
maxActiveUpdateLock
protected int
maxInactiveInterval
The default maximum inactive interval for Sessions created by this Manager.protected static String
name
The descriptive name of this Manager implementation (for logging).protected ObjectName
oname
protected String
randomClass
The Java class name of the random number generator class to be used when generating session identifiers.protected DataInputStream
randomIS
protected static ResourceBundle
rb
protected int
rejectedSessions
Number of times a session was not created because the maximum number of active sessions had been reached.protected int
sessionAverageAliveTime
Average time (in seconds) that expired sessions had been alive.protected int
sessionCounter
protected int
sessionIdLength
The session id length of Sessions created by this Manager.protected SessionLocker
sessionLocker
A SessionLocker used to lock sessions (curently only in the request dispatcher forward/include use case)protected int
sessionMaxAliveTime
The longest time (in seconds) that an expired session had been alive.protected Map<String,Session>
sessions
The set of currently active Sessions for this Manager, keyed by session identifier.protected PropertyChangeSupport
support
The property change support for this component.protected UuidGenerator
uuidGenerator
The 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 void
add(Session session)
Add this Session to the set of active Sessions for this Manager.void
addPropertyChangeListener(PropertyChangeListener listener)
Add a property change listener to this component.void
changeSessionId(Session session)
Change the session ID of the current session to a new randomly generated session ID.void
checkSessionAttribute(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.void
clearSessions()
clear out the sessions cache HERCULES:addedSession
createEmptySession()
Get a session from the recycled ones or create a new empty one.Session
createSession()
Construct and return a new session object, based on the default settings specified by this Manager's properties.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.void
destroy()
void
expireSession(String sessionId)
Session
findSession(String id)
Return the active Session, associated with this Manager, with the specified session id (if any); otherwise returnnull
.Session
findSession(String id, jakarta.servlet.http.HttpServletRequest request)
Gets the session with the given id from the given request.Session
findSession(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 String
generateSessionId()
Generate and return a new session identifier.protected String
generateSessionId(Object obj)
Generate and return a new session identifier.int
getActiveSessions()
Returns the number of active sessionsString
getClassName()
Returns the name of the implementation class.Container
getContainer()
Return the Container with which this Manager is associated.int
getDebug()
Return the debugging detail level for this component.boolean
getDistributable()
Return the distributable flag for the sessions supported by this Manager.String
getDomain()
int
getDuplicates()
Number of duplicated session IDs generated by the random source.Engine
getEngine()
Retrieve the enclosing Engine for this Manager.String
getEntropy()
Return the entropy increaser value, or compute a semi-useful value if this String has not yet been set.int
getExpiredSessions()
Gets the number of sessions that have expired.String
getInfo()
Return descriptive information about this Manager implementation and the corresponding version number, in the format<description>/<version>
.String
getJvmRoute()
Retrieve the JvmRoute for the enclosing Engine.String
getLastAccessedTimeMillis(String sessionId)
int
getMaxActive()
Max number of concurent active sessionsint
getMaxInactiveInterval()
Same as getMaxInactiveIntervalSecondsint
getMaxInactiveIntervalSeconds()
Return the default maximum inactive interval (in seconds) for Sessions created by this Manager.String
getName()
Return the descriptive short name of this Manager implementation.protected StandardSession
getNewSession()
Get new session class to be used in the doLoad() method.ObjectName
getObjectName()
SecureRandom
getRandom()
Return the random number generator instance we should use for generating session identifiers.protected void
getRandomBytes(byte[] bytes)
String
getRandomClass()
Return the random number generator class name.String
getRandomFile()
int
getRejectedSessions()
Gets the number of session creations that failed due to maxActiveSessionsString
getSessionAttribute(String sessionId, String key)
For debugging: get a session attributeint
getSessionAverageAliveTime()
Same as getSessionAverageAliveTimeSecondsint
getSessionAverageAliveTimeSeconds()
Gets the average time (in seconds) that expired sessions had been alive.int
getSessionCount()
Total sessions created by this manager.int
getSessionCounter()
Same as getSessionCountint
getSessionIdLength()
Gets the session id length (in bytes) of Sessions created by this Manager.int
getSessionMaxAliveTime()
Same as getSessionMaxAliveTimeSecondsint
getSessionMaxAliveTimeSeconds()
Gets the longest time (in seconds) that an expired session had been alive.UuidGenerator
getUuidGenerator()
Return the UuidGenerator for this Manager.void
init()
boolean
isSessionVersioningSupported()
Returns true if this session manager supports session versioning, false otherwise.String
listSessionIds()
For debugging: return a list of all session ids currently activeboolean
lockSession(jakarta.servlet.ServletRequest request)
protected void
log(String message)
Deprecated.protected void
log(String message, Throwable throwable)
Deprecated.void
postRequestDispatcherProcess(jakarta.servlet.ServletRequest request, jakarta.servlet.ServletResponse response)
void
preRequestDispatcherProcess(jakarta.servlet.ServletRequest request, jakarta.servlet.ServletResponse response)
void
release()
void
remove(Session session)
Remove this Session from the active Sessions for this Manager.void
removePropertyChangeListener(PropertyChangeListener listener)
Remove a property change listener from this component.protected void
resetRandom()
Reset the random number generator instance to null.void
setContainer(Container container)
Set the Container with which this Manager is associated.void
setDebug(int debug)
Set the debugging detail level for this component.void
setDistributable(boolean distributable)
Set the distributable flag for the sessions supported by this Manager.void
setDuplicates(int duplicates)
void
setEntropy(String entropy)
Set the entropy increaser value.void
setExpiredSessions(int expiredSessions)
Sets the number of sessions that have expired.void
setMaxActive(int maxActive)
(Re)sets the maximum number of sessions that have been active at the same time.void
setMaxInactiveInterval(int interval)
Same as setMaxInactiveIntervalSecondsvoid
setMaxInactiveIntervalSeconds(int interval)
Set the default maximum inactive interval (in seconds) for Sessions created by this Manager.void
setRandomClass(String randomClass)
Set the random number generator class name.void
setRandomFile(String s)
Use /dev/random-type special device.void
setRejectedSessions(int rejectedSessions)
Sets the number of sessions that were not created because the maximum number of active sessions was reached.void
setSessionAverageAliveTime(int sessionAverageAliveTime)
Same as setSessionAverageAliveTimeSecondsvoid
setSessionAverageAliveTimeSeconds(int sessionAverageAliveTime)
Sets the average time (in seconds) that expired sessions had been alive.void
setSessionCount(int sessionCounter)
Sets the total number of sessions created by this manager.void
setSessionCounter(int sessionCounter)
Same as setSessionCountvoid
setSessionIdLength(int idLength)
Sets the session id length (in bytes) for Sessions created by this Manager.void
setSessionLocker(SessionLocker sessLocker)
set the pluggable sessionLocker for this manager by default it is pre-set to no-op BaseSessionLockervoid
setSessionMaxAliveTime(int sessionMaxAliveTime)
Same as setSessionMaxAliveTimeSecondsvoid
setSessionMaxAliveTimeSeconds(int sessionMaxAliveTime)
Sets the longest time (in seconds) that an expired session had been alive.void
setUuidGenerator(UuidGenerator aUuidGenerator)
Set the UuidGenerator for this Manager.jakarta.servlet.http.Cookie
toCookie(Session session)
Converts the given session into a cookie as a way of persisting it.void
unlockSession(jakarta.servlet.ServletRequest request)
void
update(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:
getContainer
in interfaceManager
-
setContainer
public void setContainer(Container container)
Set the Container with which this Manager is associated.- Specified by:
setContainer
in 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:
getDistributable
in 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:
setDistributable
in 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:
getMaxInactiveInterval
in interfaceManager
-
getMaxInactiveIntervalSeconds
public int getMaxInactiveIntervalSeconds()
Return the default maximum inactive interval (in seconds) for Sessions created by this Manager.- Specified by:
getMaxInactiveIntervalSeconds
in interfaceManager
-
setMaxInactiveInterval
public void setMaxInactiveInterval(int interval)
Same as setMaxInactiveIntervalSeconds- Specified by:
setMaxInactiveInterval
in interfaceManager
-
setMaxInactiveIntervalSeconds
public void setMaxInactiveIntervalSeconds(int interval)
Set the default maximum inactive interval (in seconds) for Sessions created by this Manager.- Specified by:
setMaxInactiveIntervalSeconds
in 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:
getSessionIdLength
in 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:
setSessionIdLength
in interfaceManager
- Parameters:
idLength
- The session id length
-
getRejectedSessions
public int getRejectedSessions()
Gets the number of session creations that failed due to maxActiveSessions- Specified by:
getRejectedSessions
in 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:
setRejectedSessions
in 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:
getExpiredSessions
in interfaceManager
- Returns:
- Number of sessions that have expired
-
setExpiredSessions
public void setExpiredSessions(int expiredSessions)
Sets the number of sessions that have expired.- Specified by:
setExpiredSessions
in 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:
addPropertyChangeListener
in 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:
createSession
in 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:
createSession
in interfaceManager
- Parameters:
sessionId
- the session id to assign to the new session- Returns:
- the new session, or
null
if 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:
createEmptySession
in interfaceManager
-
checkSessionAttribute
public void checkSessionAttribute(String name, Object value)
Description copied from interface:Manager
Checks 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:
checkSessionAttribute
in 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:
findSession
in 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:Manager
Gets the session with the given id from the given request.- Specified by:
findSession
in 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:
findSession
in 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:
isSessionVersioningSupported
in 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:Manager
Return the set of active Sessions associated with this Manager. If this Manager has no active Sessions, a empty list is returned.- Specified by:
findSessions
in 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:Manager
Converts the given session into a cookie as a way of persisting it.- Specified by:
toCookie
in 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:
removePropertyChangeListener
in 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:
changeSessionId
in 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:
setSessionCounter
in interfaceManager
-
setSessionCount
public void setSessionCount(int sessionCounter)
Description copied from interface:Manager
Sets the total number of sessions created by this manager.- Specified by:
setSessionCount
in interfaceManager
- Parameters:
sessionCounter
- Total number of sessions created by this manager.
-
getSessionCounter
public int getSessionCounter()
Same as getSessionCount- Specified by:
getSessionCounter
in interfaceManager
-
getSessionCount
public int getSessionCount()
Total sessions created by this manager.- Specified by:
getSessionCount
in 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:
getActiveSessions
in interfaceManager
- Returns:
- number of sessions active
-
getMaxActive
public int getMaxActive()
Max number of concurent active sessions- Specified by:
getMaxActive
in 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:
setMaxActive
in interfaceManager
- Parameters:
maxActive
- Maximum number of sessions that have been active at the same time.
-
getSessionMaxAliveTime
public int getSessionMaxAliveTime()
Same as getSessionMaxAliveTimeSeconds- Specified by:
getSessionMaxAliveTime
in interfaceManager
-
getSessionMaxAliveTimeSeconds
public int getSessionMaxAliveTimeSeconds()
Gets the longest time (in seconds) that an expired session had been alive.- Specified by:
getSessionMaxAliveTimeSeconds
in interfaceManager
- Returns:
- Longest time (in seconds) that an expired session had been alive.
-
setSessionMaxAliveTime
public void setSessionMaxAliveTime(int sessionMaxAliveTime)
Same as setSessionMaxAliveTimeSeconds- Specified by:
setSessionMaxAliveTime
in interfaceManager
-
setSessionMaxAliveTimeSeconds
public void setSessionMaxAliveTimeSeconds(int sessionMaxAliveTime)
Sets the longest time (in seconds) that an expired session had been alive.- Specified by:
setSessionMaxAliveTimeSeconds
in interfaceManager
- Parameters:
sessionMaxAliveTime
- Longest time (in seconds) that an expired session had been alive.
-
getSessionAverageAliveTime
public int getSessionAverageAliveTime()
Same as getSessionAverageAliveTimeSeconds- Specified by:
getSessionAverageAliveTime
in interfaceManager
-
getSessionAverageAliveTimeSeconds
public int getSessionAverageAliveTimeSeconds()
Gets the average time (in seconds) that expired sessions had been alive.- Specified by:
getSessionAverageAliveTimeSeconds
in interfaceManager
- Returns:
- Average time (in seconds) that expired sessions had been alive.
-
setSessionAverageAliveTime
public void setSessionAverageAliveTime(int sessionAverageAliveTime)
Same as setSessionAverageAliveTimeSeconds- Specified by:
setSessionAverageAliveTime
in interfaceManager
-
setSessionAverageAliveTimeSeconds
public void setSessionAverageAliveTimeSeconds(int sessionAverageAliveTime)
Sets the average time (in seconds) that expired sessions had been alive.- Specified by:
setSessionAverageAliveTimeSeconds
in 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 Exception
Perform 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:
postRequestDispatcherProcess
in interfaceManager
-
preRequestDispatcherProcess
public void preRequestDispatcherProcess(jakarta.servlet.ServletRequest request, jakarta.servlet.ServletResponse response)
- Specified by:
preRequestDispatcherProcess
in interfaceManager
-
lockSession
public boolean lockSession(jakarta.servlet.ServletRequest request) throws jakarta.servlet.ServletException
- Specified by:
lockSession
in interfaceManager
- Throws:
jakarta.servlet.ServletException
-
unlockSession
public void unlockSession(jakarta.servlet.ServletRequest request)
- Specified by:
unlockSession
in interfaceManager
-
release
public void release()
-
-