javax.management.MBeanRegistration
, JmxEnabled
, Lifecycle
, Manager
public class StandardManager extends ManagerBase
IMPLEMENTATION NOTE: Correct behavior of session storing and
reloading depends upon external calls to the start()
and
stop()
methods of this class at the correct times.
Lifecycle.SingleUse
ManagerBase.SessionTiming
Modifier and Type | Field | Description |
---|---|---|
protected static java.lang.String |
name |
The descriptive name of this Manager implementation (for logging).
|
protected java.lang.String |
pathname |
Path name of the disk file in which active sessions are saved
when we stop, and from which these sessions are loaded when we start.
|
AFTER_DESTROY_EVENT, AFTER_INIT_EVENT, AFTER_START_EVENT, AFTER_STOP_EVENT, BEFORE_DESTROY_EVENT, BEFORE_INIT_EVENT, BEFORE_START_EVENT, BEFORE_STOP_EVENT, CONFIGURE_START_EVENT, CONFIGURE_STOP_EVENT, PERIODIC_EVENT, START_EVENT, STOP_EVENT
mserver
duplicates, expiredSessions, maxActive, maxActiveSessions, processExpiresFrequency, processingTime, rejectedSessions, secureRandomAlgorithm, secureRandomClass, secureRandomProvider, sessionCounter, sessionCreationTiming, sessionExpirationTiming, sessionIdGenerator, sessionIdGeneratorClass, sessionMaxAliveTime, sessions, sm, support, TIMING_STATS_CACHE_SIZE
Constructor | Description |
---|---|
StandardManager() |
Modifier and Type | Method | Description |
---|---|---|
protected void |
doLoad() |
Load any currently active sessions that were previously unloaded
to the appropriate persistence mechanism, if any.
|
protected void |
doUnload() |
Save any currently active sessions in the appropriate persistence
mechanism, if any.
|
protected java.io.File |
file() |
Return a File object representing the pathname to our
persistence file, if any.
|
java.lang.String |
getName() |
|
java.lang.String |
getPathname() |
|
void |
load() |
Load any currently active sessions that were previously unloaded
to the appropriate persistence mechanism, if any.
|
void |
setPathname(java.lang.String pathname) |
Set the session persistence pathname to the specified value.
|
protected void |
startInternal() |
Start this component and implement the requirements
of
LifecycleBase.startInternal() . |
protected void |
stopInternal() |
Stop this component and implement the requirements
of
LifecycleBase.stopInternal() . |
void |
unload() |
Save any currently active sessions in the appropriate persistence
mechanism, if any.
|
addLifecycleListener, destroy, findLifecycleListeners, fireLifecycleEvent, getState, getStateName, getThrowOnFailure, init, removeLifecycleListener, setState, setState, setThrowOnFailure, start, stop
destroyInternal, getDomain, getObjectName, postDeregister, postRegister, preDeregister, preRegister, register, setDomain, unregister
add, addPropertyChangeListener, backgroundProcess, changeSessionId, changeSessionId, changeSessionId, createEmptySession, createSession, expireSession, findSession, findSessions, generateSessionId, getActiveSessions, getClassName, getContext, getCreationTime, getCreationTimestamp, getDomainInternal, getDuplicates, getEngine, getExpiredSessions, getJvmRoute, getLastAccessedTime, getLastAccessedTimestamp, getMaxActive, getMaxActiveSessions, getNewSession, getNotifyAttributeListenerOnUnchangedValue, getNotifyBindingListenerOnUnchangedValue, getObjectNameKeyProperties, getProcessExpiresFrequency, getProcessingTime, getRejectedSessions, getSecureRandomAlgorithm, getSecureRandomClass, getSecureRandomProvider, getSession, getSessionAttribute, getSessionAttributeNameFilter, getSessionAttributeNamePattern, getSessionAttributeValueClassNameFilter, getSessionAttributeValueClassNamePattern, getSessionAverageAliveTime, getSessionCounter, getSessionCreateRate, getSessionExpireRate, getSessionIdGenerator, getSessionMaxAliveTime, getThisAccessedTime, getThisAccessedTimestamp, getWarnOnSessionAttributeFilterFailure, initInternal, listSessionIds, processExpires, remove, remove, removePropertyChangeListener, setContext, setDuplicates, setExpiredSessions, setMaxActive, setMaxActiveSessions, setNotifyAttributeListenerOnUnchangedValue, setNotifyBindingListenerOnUnchangedValue, setProcessExpiresFrequency, setProcessingTime, setSecureRandomAlgorithm, setSecureRandomClass, setSecureRandomProvider, setSessionAttributeNameFilter, setSessionAttributeValueClassNameFilter, setSessionCounter, setSessionIdGenerator, setSessionMaxAliveTime, setWarnOnSessionAttributeFilterFailure, toString, updateSessionMaxAliveTime, willAttributeDistribute
protected static final java.lang.String name
protected java.lang.String pathname
null
value indicates that no persistence is desired.
If this pathname is relative, it will be resolved against the
temporary working directory provided by our context, available via
the javax.servlet.context.tempdir
context attribute.public java.lang.String getName()
getName
in class ManagerBase
public java.lang.String getPathname()
public void setPathname(java.lang.String pathname)
null
.pathname
- New session persistence pathnamepublic void load() throws java.lang.ClassNotFoundException, java.io.IOException
Manager
java.lang.ClassNotFoundException
- if a serialized class cannot be
found during the reloadjava.io.IOException
- if an input/output error occursprotected void doLoad() throws java.lang.ClassNotFoundException, java.io.IOException
java.lang.ClassNotFoundException
- if a serialized class cannot be
found during the reloadjava.io.IOException
- if an input/output error occurspublic void unload() throws java.io.IOException
Manager
java.io.IOException
- if an input/output error occursprotected void doUnload() throws java.io.IOException
java.io.IOException
- if an input/output error occursprotected void startInternal() throws LifecycleException
LifecycleBase.startInternal()
.startInternal
in class ManagerBase
LifecycleException
- if this component detects a fatal error
that prevents this component from being usedprotected void stopInternal() throws LifecycleException
LifecycleBase.stopInternal()
.stopInternal
in class ManagerBase
LifecycleException
- if this component detects a fatal error
that prevents this component from being usedprotected java.io.File file()
Copyright © 2000-2019 Apache Software Foundation. All Rights Reserved.