|
||||||||||
PREV CLASS (src) NEXT CLASS (src) | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.web.tomcat.tc5.session.JBossManager
Base abstract implementation of Tomcat manager without the concept of session operations, e.g., add, remove, etc.
Field Summary | |
protected int |
activeCounter_
|
protected Container |
container_
The Container with which this Manager is associated. |
protected int |
createdCounter_
|
protected boolean |
distributable_
/** The distributable flag for Sessions created by this Manager. |
protected int |
expiredCounter_
|
protected int |
invalidateSessionPolicy_
Policy to determine if a session is dirty |
protected LifecycleSupport |
lifecycle_
The lifecycle_ event support for this component. |
protected Logger (src) |
log_
The Log-object for this class |
protected int |
maxActive_
|
protected int |
maxInactiveInterval_
The default maximum inactive interval for Sessions created by this Manager. |
protected ObjectName (src) |
objectName_
The objectname this Manager is associated with |
protected int |
rejectedCounter_
|
protected int |
replicationGranularity_
Replication granulairty. |
protected SessionIDGenerator (src) |
sessionIDGenerator_
|
protected int |
sessionIdLength_
The session id length of Sessions created by this Manager. |
protected java.util.Map |
sessions_
Store the local sessions. |
protected boolean |
started_
Has this component been started_ yet? |
protected ReplicationStatistics (src) |
stats_
|
protected java.beans.PropertyChangeSupport |
support_
The property change support for this component. |
protected long |
timeSinceLastReset_
|
protected boolean |
useLocalCache_
If set to true, it will not replicate the access time stamp unless attributes are dirty. |
Constructor Summary | |
JBossManager()
|
Method Summary | |
void |
addLifecycleListener(LifecycleListener listener)
|
void |
addPropertyChangeListener(java.beans.PropertyChangeListener listener)
|
void |
backgroundProcess()
|
LifecycleListener[] |
findLifecycleListeners()
|
abstract org.jboss.web.tomcat.tc5.session.ClusteredSession |
findLocalSession(java.lang.String realId)
Find in-memory sessions, if any. |
abstract org.jboss.web.tomcat.tc5.session.ClusteredSession[] |
findLocalSessions()
Find in-memory sessions, if any. |
long |
getActiveSessionCount()
|
int |
getActiveSessions()
|
Container |
getContainer()
|
long |
getCreatedSessionCount()
|
boolean |
getDistributable()
|
Engine |
getEngine()
Retrieve the enclosing Engine for this Manager. |
long |
getExpiredSessionCount()
|
int |
getExpiredSessions()
|
java.lang.String |
getInfo()
|
int |
getInvalidateSessionPolicy()
The session invalidation policy. |
java.lang.String |
getJvmRoute()
Retrieve the JvmRoute for the enclosing Engine. |
int |
getMaxActive()
|
int |
getMaxInactiveInterval()
|
protected java.lang.String |
getNextId()
Get a new session-id from the distributed store |
long |
getRejectedSessionCount()
|
int |
getRejectedSessions()
|
ReplicationStatistics (src) |
getReplicationStatistics()
|
int |
getSessionAverageAliveTime()
|
int |
getSessionCounter()
|
int |
getSessionIdLength()
|
int |
getSessionMaxAliveTime()
|
void |
init(java.lang.String name,
WebMetaData (src) webMetaData,
boolean useJK,
boolean useLocalCache)
Initialize the manager with the web metadata and |
boolean |
isUseLocalCache()
|
void |
load()
|
protected void |
processExpires()
Go through all sessions and look if they have expired |
void |
propertyChange(java.beans.PropertyChangeEvent evt)
|
void |
removeLifecycleListener(LifecycleListener listener)
|
abstract void |
removeLocal(Session session)
Remove the active session locally from the manager without replicating to the cluster. |
void |
removePropertyChangeListener(java.beans.PropertyChangeListener listener)
|
java.lang.String |
reportReplicationStatistics()
|
void |
resetStats()
|
void |
setContainer(Container container)
|
void |
setDistributable(boolean distributable)
|
void |
setExpiredSessions(int expiredSessions)
|
void |
setMaxActive(int maxActive)
|
void |
setMaxInactiveInterval(int interval)
|
void |
setNewSessionCookie(java.lang.String sessionId,
HttpServletResponse response)
Sets a new cookie for the given session id and response |
void |
setRejectedSessions(int rejectedSessions)
|
void |
setSessionAverageAliveTime(int sessionAverageAliveTime)
|
void |
setSessionCookie(java.lang.String sessionId)
Sets a new cookie for the given session id and response |
void |
setSessionCounter(int sessionCounter)
|
void |
setSessionIdLength(int idLength)
|
void |
setSessionMaxAliveTime(int sessionMaxAliveTime)
|
void |
start()
Start this Manager |
protected void |
startManager()
Prepare for the beginning of active use of the public methods of this component. |
void |
stop()
Stop this Manager |
protected void |
stopManager()
Gracefully terminate the active use of the public methods of this component. |
abstract boolean |
storeSession(Session session)
Store the modified session. |
long |
timeInSecondsSinceLastReset()
|
void |
unload()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected ReplicationStatistics (src) stats_
protected int invalidateSessionPolicy_
protected int replicationGranularity_
protected LifecycleSupport lifecycle_
protected boolean started_
protected ObjectName (src) objectName_
protected Logger (src) log_
protected Container container_
protected boolean distributable_
true
, any user attributes added to a
session controlled by this Manager must be Serializable.
protected int maxInactiveInterval_
protected int sessionIdLength_
protected int maxActive_
protected int createdCounter_
protected int rejectedCounter_
protected int activeCounter_
protected int expiredCounter_
protected long timeSinceLastReset_
protected java.util.Map sessions_
protected boolean useLocalCache_
protected java.beans.PropertyChangeSupport support_
protected SessionIDGenerator (src) sessionIDGenerator_
Constructor Detail |
public JBossManager()
Method Detail |
public void init(java.lang.String name, WebMetaData (src) webMetaData, boolean useJK, boolean useLocalCache) throws ClusteringNotSupportedException (src)
AbstractJBossManager (src)
init
in interface AbstractJBossManager (src)
name
- webMetaData
- useJK
- useLocalCache
-
ClusteringNotSupportedException (src)
public int getInvalidateSessionPolicy()
AbstractJBossManager (src)
getInvalidateSessionPolicy
in interface AbstractJBossManager (src)
public Engine getEngine()
public java.lang.String getJvmRoute()
getJvmRoute
in interface AbstractJBossManager (src)
protected java.lang.String getNextId()
public boolean isUseLocalCache()
public void setSessionCookie(java.lang.String sessionId)
sessionId
- The session idpublic void setNewSessionCookie(java.lang.String sessionId, HttpServletResponse response)
AbstractJBossManager (src)
setNewSessionCookie
in interface AbstractJBossManager (src)
sessionId
- The session idpublic ReplicationStatistics (src) getReplicationStatistics()
getReplicationStatistics
in interface JBossManagerMBean (src)
public void resetStats()
resetStats
in interface JBossManagerMBean (src)
public long timeInSecondsSinceLastReset()
timeInSecondsSinceLastReset
in interface JBossManagerMBean (src)
public long getActiveSessionCount()
getActiveSessionCount
in interface JBossManagerMBean (src)
public long getCreatedSessionCount()
getCreatedSessionCount
in interface JBossManagerMBean (src)
public long getExpiredSessionCount()
getExpiredSessionCount
in interface JBossManagerMBean (src)
public long getRejectedSessionCount()
getRejectedSessionCount
in interface JBossManagerMBean (src)
public int getSessionMaxAliveTime()
public void setSessionMaxAliveTime(int sessionMaxAliveTime)
public int getSessionAverageAliveTime()
public void setSessionAverageAliveTime(int sessionAverageAliveTime)
public java.lang.String reportReplicationStatistics()
reportReplicationStatistics
in interface JBossManagerMBean (src)
public void addLifecycleListener(LifecycleListener listener)
public LifecycleListener[] findLifecycleListeners()
public void removeLifecycleListener(LifecycleListener listener)
public void start() throws LifecycleException
org.apache.catalina.LifecycleException
LifecycleException
public void stop() throws LifecycleException
org.apache.catalina.LifecycleException
LifecycleException
protected void startManager() throws LifecycleException
configure()
,
and before any of the public methods of the component are utilized.
java.lang.IllegalStateException
- if this component has already been
started_
org.apache.catalina.LifecycleException
- if this component detects a fatal error
that prevents this component from being used
LifecycleException
protected void stopManager() throws LifecycleException
java.lang.IllegalStateException
- if this component has not been started_
org.apache.catalina.LifecycleException
- if this component detects a fatal error
that needs to be reported
LifecycleException
public Container getContainer()
public void setContainer(Container container)
public boolean getDistributable()
public void setDistributable(boolean distributable)
public java.lang.String getInfo()
public int getMaxInactiveInterval()
public void setMaxInactiveInterval(int interval)
public int getSessionIdLength()
public void setSessionIdLength(int idLength)
public int getSessionCounter()
public void setSessionCounter(int sessionCounter)
public int getMaxActive()
public void setMaxActive(int maxActive)
public int getExpiredSessions()
public void setExpiredSessions(int expiredSessions)
public int getRejectedSessions()
public void setRejectedSessions(int rejectedSessions)
public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
public abstract void removeLocal(Session session)
removeLocal
in interface AbstractJBossManager (src)
session
- public abstract boolean storeSession(Session session)
storeSession
in interface AbstractJBossManager (src)
session
- public int getActiveSessions()
public void load() throws java.lang.ClassNotFoundException, java.io.IOException
java.lang.ClassNotFoundException
java.io.IOException
public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
public void unload() throws java.io.IOException
java.io.IOException
public void backgroundProcess()
protected void processExpires()
public void propertyChange(java.beans.PropertyChangeEvent evt)
propertyChange
in interface java.beans.PropertyChangeListener
public abstract org.jboss.web.tomcat.tc5.session.ClusteredSession[] findLocalSessions()
public abstract org.jboss.web.tomcat.tc5.session.ClusteredSession findLocalSession(java.lang.String realId)
realId
- the Session id without JvmRoute tag.
|
||||||||||
PREV CLASS (src) NEXT CLASS (src) | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |