|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.catalina.session.ManagerBase
org.apache.catalina.session.StandardManager
org.mobicents.servlet.sip.core.session.SipStandardManager
public class SipStandardManager
Extension of the Standard implementation of the Manager interface provided by Tomcat to be able to make the httpsession available as ConvergedHttpSession as for Spec JSR289 Section 13.5 and to handle management of sip sessions and sip application sessions for a given container (context)
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.apache.catalina.session.ManagerBase |
|---|
org.apache.catalina.session.ManagerBase.SessionTiming |
| Field Summary | |
|---|---|
protected static java.lang.String |
INFO
The descriptive information about this implementation. |
protected static java.lang.String |
NAME
The descriptive name of this Manager implementation (for logging). |
| Fields inherited from class org.apache.catalina.session.StandardManager |
|---|
info, lifecycle, maxActiveSessions, name, pathname, processingTime, rejectedSessions, started |
| Fields inherited from class org.apache.catalina.session.ManagerBase |
|---|
algorithm, container, DEFAULT_ALGORITHM, devRandomSource, digest, distributable, domain, duplicates, entropy, expiredSessions, initialized, log, maxActive, maxInactiveInterval, mserver, oname, processExpiresFrequency, random, randomClass, randomIS, sessionAverageAliveTime, sessionCounter, sessionCreationTiming, sessionExpirationTiming, sessionIdLength, sessionMaxAliveTime, sessions, sm, support, TIMING_STATS_CACHE_SIZE |
| Fields inherited from interface org.apache.catalina.Lifecycle |
|---|
AFTER_START_EVENT, AFTER_STOP_EVENT, BEFORE_START_EVENT, BEFORE_STOP_EVENT, DESTROY_EVENT, INIT_EVENT, PERIODIC_EVENT, START_EVENT, STOP_EVENT |
| Constructor Summary | |
|---|---|
SipStandardManager()
|
|
| Method Summary | |
|---|---|
void |
dumpSipApplicationSessions()
|
void |
dumpSipSessions()
|
MobicentsSipApplicationSession |
findSipApplicationSession(javax.servlet.http.HttpSession httpSession)
Retrieves the sip application session holding the converged http session in parameter |
int |
getActiveSipApplicationSessions()
Returns the number of active sessions |
int |
getActiveSipSessions()
Returns the number of active sessions |
java.util.Iterator<MobicentsSipApplicationSession> |
getAllSipApplicationSessions()
|
java.util.Iterator<MobicentsSipSession> |
getAllSipSessions()
|
org.apache.catalina.Container |
getContainer()
|
int |
getExpiredSipApplicationSessions()
Gets the number of sessions that have expired. |
int |
getExpiredSipSessions()
Gets the number of sessions that have expired. |
java.lang.String |
getInfo()
Return descriptive information about this Manager implementation and the corresponding version number, in the format <description>/<version>. |
int |
getMaxActiveSipApplicationSessions()
Return the maximum number of active Sessions allowed, or -1 for no limit. |
int |
getMaxActiveSipSessions()
Return the maximum number of active Sessions allowed, or -1 for no limit. |
java.lang.String |
getName()
Return the descriptive short name of this Manager implementation. |
protected org.apache.catalina.session.StandardSession |
getNewSession()
|
double |
getNumberOfSipApplicationSessionCreationPerSecond()
Gets the number of sip application sessions per seconds that have been created. |
double |
getNumberOfSipSessionCreationPerSecond()
Gets the number of sip sessions per seconds that have been created. |
int |
getRejectedSipApplicationSessions()
Number of sip session creations that failed due to maxActiveSipSessions |
int |
getRejectedSipSessions()
Number of sip session creations that failed due to maxActiveSipSessions |
MobicentsSipApplicationSession |
getSipApplicationSession(SipApplicationSessionKey key,
boolean create)
Retrieve a sip application session from its key. |
int |
getSipApplicationSessionAverageAliveTime()
Gets the average time (in seconds) that expired sessions had been alive. |
int |
getSipApplicationSessionCounter()
Total sessions created by this manager. |
int |
getSipApplicationSessionMaxAliveTime()
Gets the longest time (in seconds) that an expired session had been alive. |
SipFactoryImpl |
getSipFactoryImpl()
|
MobicentsSipSession |
getSipSession(SipSessionKey key,
boolean create,
SipFactoryImpl sipFactoryImpl,
MobicentsSipApplicationSession sipApplicationSessionImpl)
Retrieve a sip session from its key. |
int |
getSipSessionAverageAliveTime()
Gets the average time (in seconds) that expired sessions had been alive. |
int |
getSipSessionCounter()
Total sessions created by this manager. |
int |
getSipSessionMaxAliveTime()
Gets the longest time (in seconds) that an expired session had been alive. |
void |
init()
|
java.lang.String |
listSipApplicationSessionIds()
For debugging: return a list of all session ids currently active |
java.lang.String |
listSipSessionIds()
For debugging: return a list of all session ids currently active |
void |
removeAllSessions()
Remove the sip sessions and sip application sessions |
MobicentsSipApplicationSession |
removeSipApplicationSession(SipApplicationSessionKey key)
Removes a sip application session from the manager by its key |
MobicentsSipSession |
removeSipSession(SipSessionKey key)
Removes a sip session from the manager by its key |
void |
setContainer(org.apache.catalina.Container container)
|
void |
setExpiredSipApplicationSessions(int expiredSipApplicationSessions)
Sets the number of sessions that have expired. |
void |
setExpiredSipSessions(int expiredSipSessions)
Sets the number of sessions that have expired. |
void |
setMaxActiveSipApplicationSessions(int max)
Set the maximum number of actives Sip Application Sessions allowed, or -1 for no limit. |
void |
setMaxActiveSipSessions(int max)
Set the maximum number of actives Sip Sessions allowed, or -1 for no limit. |
void |
setRejectedSipApplicationSessions(int rejectedSipApplicationSessions)
|
void |
setRejectedSipSessions(int rejectedSipSessions)
|
void |
setSipApplicationSessionAverageAliveTime(int sipApplicationSessionAverageAliveTime)
Sets the average time (in seconds) that expired sessions had been alive. |
void |
setSipApplicationSessionCounter(int sipApplicationSessionCounter)
|
void |
setSipApplicationSessionMaxAliveTime(int sipApplicationSessionMaxAliveTime)
Sets the longest time (in seconds) that an expired session had been alive. |
void |
setSipFactoryImpl(SipFactoryImpl sipFactoryImpl)
|
void |
setSipSessionAverageAliveTime(int sipSessionAverageAliveTime)
Sets the average time (in seconds) that expired sessions had been alive. |
void |
setSipSessionCounter(int sipSessionCounter)
|
void |
setSipSessionMaxAliveTime(int sipSessionMaxAliveTime)
Sets the longest time (in seconds) that an expired session had been alive. |
void |
updateStats()
Update statistics |
| Methods inherited from class org.apache.catalina.session.StandardManager |
|---|
addLifecycleListener, createSession, doLoad, doUnload, file, findLifecycleListeners, getMaxActiveSessions, getPathname, getRejectedSessions, load, propertyChange, removeLifecycleListener, setMaxActiveSessions, setPathname, setRejectedSessions, start, stop, unload |
| Methods inherited from class org.apache.catalina.session.ManagerBase |
|---|
add, addPropertyChangeListener, backgroundProcess, changeSessionId, createEmptySession, createSession, destroy, expireSession, findSession, findSessions, generateSessionId, getActiveSessions, getAlgorithm, getClassName, getCreationTime, getCreationTimestamp, getDigest, getDistributable, getDomain, getDuplicates, getEngine, getEntropy, getExpiredSessions, getJvmRoute, getLastAccessedTime, getLastAccessedTimestamp, getMaxActive, getMaxInactiveInterval, getObjectName, getProcessExpiresFrequency, getProcessingTime, getRandom, getRandomBytes, getRandomClass, getRandomFile, getSession, getSessionAttribute, getSessionAverageAliveTime, getSessionCounter, getSessionCreateRate, getSessionExpireRate, getSessionIdLength, getSessionMaxAliveTime, listSessionIds, postDeregister, postRegister, preDeregister, preRegister, processExpires, remove, removePropertyChangeListener, setAlgorithm, setDistributable, setDuplicates, setEntropy, setExpiredSessions, setMaxActive, setMaxInactiveInterval, setProcessExpiresFrequency, setProcessingTime, setRandomClass, setRandomFile, setSessionAverageAliveTime, setSessionCounter, setSessionIdLength, setSessionMaxAliveTime |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.apache.catalina.Manager |
|---|
add, addPropertyChangeListener, backgroundProcess, changeSessionId, createEmptySession, createSession, createSession, findSession, findSessions, getActiveSessions, getDistributable, getExpiredSessions, getMaxActive, getMaxInactiveInterval, getRejectedSessions, getSessionAverageAliveTime, getSessionCounter, getSessionIdLength, getSessionMaxAliveTime, load, remove, removePropertyChangeListener, setDistributable, setExpiredSessions, setMaxActive, setMaxInactiveInterval, setRejectedSessions, setSessionAverageAliveTime, setSessionCounter, setSessionIdLength, setSessionMaxAliveTime, unload |
| Field Detail |
|---|
protected static final java.lang.String INFO
protected static final java.lang.String NAME
| Constructor Detail |
|---|
public SipStandardManager()
| Method Detail |
|---|
public void init()
init in class org.apache.catalina.session.ManagerBaseprotected org.apache.catalina.session.StandardSession getNewSession()
getNewSession in class org.apache.catalina.session.ManagerBasepublic SipFactoryImpl getSipFactoryImpl()
getSipFactoryImpl in interface SipManagerpublic void setSipFactoryImpl(SipFactoryImpl sipFactoryImpl)
setSipFactoryImpl in interface SipManagersipFactoryImpl - the SipFactoryImpl to setpublic org.apache.catalina.Container getContainer()
getContainer in interface org.apache.catalina.ManagergetContainer in class org.apache.catalina.session.ManagerBasepublic void setContainer(org.apache.catalina.Container container)
setContainer in interface org.apache.catalina.ManagersetContainer in class org.apache.catalina.session.StandardManagercontainer - the container to setpublic MobicentsSipSession removeSipSession(SipSessionKey key)
removeSipSession in interface SipManagerkey - the identifier for this session
public MobicentsSipApplicationSession removeSipApplicationSession(SipApplicationSessionKey key)
removeSipApplicationSession in interface SipManagerkey - the identifier for this session
public MobicentsSipApplicationSession getSipApplicationSession(SipApplicationSessionKey key,
boolean create)
getSipApplicationSession in interface SipManagerkey - the key identifying the sip application session to retrievecreate - if set to true, if no session has been found one will be created
public MobicentsSipSession getSipSession(SipSessionKey key,
boolean create,
SipFactoryImpl sipFactoryImpl,
MobicentsSipApplicationSession sipApplicationSessionImpl)
getSipSession in interface SipManagerkey - the key identifying the sip session to retrievecreate - if set to true, if no session has been found one will be createdsipFactoryImpl - needed only for sip session creation.sipApplicationSessionImpl - to associate the SipSession with if create is set to true, if false it won't be used
public java.util.Iterator<MobicentsSipSession> getAllSipSessions()
getAllSipSessions in interface SipManagerpublic java.util.Iterator<MobicentsSipApplicationSession> getAllSipApplicationSessions()
getAllSipApplicationSessions in interface SipManagerpublic MobicentsSipApplicationSession findSipApplicationSession(javax.servlet.http.HttpSession httpSession)
findSipApplicationSession in interface SipManagerpublic void dumpSipSessions()
dumpSipSessions in interface SipManagerpublic void dumpSipApplicationSessions()
dumpSipApplicationSessions in interface SipManagerpublic void removeAllSessions()
removeAllSessions in interface SipManagerpublic java.lang.String getInfo()
<description>/<version>.
getInfo in interface org.apache.catalina.ManagergetInfo in class org.apache.catalina.session.StandardManagerpublic java.lang.String getName()
getName in class org.apache.catalina.session.StandardManagerpublic int getMaxActiveSipSessions()
getMaxActiveSipSessions in interface SipManagerpublic void setMaxActiveSipSessions(int max)
setMaxActiveSipSessions in interface SipManagermax - The new maximum number of sip sessionspublic int getMaxActiveSipApplicationSessions()
getMaxActiveSipApplicationSessions in interface SipManagerpublic void setMaxActiveSipApplicationSessions(int max)
setMaxActiveSipApplicationSessions in interface SipManagermax - The new maximum number of sip application sessionspublic int getRejectedSipSessions()
getRejectedSipSessions in interface SipManagerpublic void setRejectedSipSessions(int rejectedSipSessions)
setRejectedSipSessions in interface SipManagerpublic int getRejectedSipApplicationSessions()
getRejectedSipApplicationSessions in interface SipManagerpublic void setRejectedSipApplicationSessions(int rejectedSipApplicationSessions)
setRejectedSipApplicationSessions in interface SipManagerpublic void setSipSessionCounter(int sipSessionCounter)
setSipSessionCounter in interface SipManagerpublic int getSipSessionCounter()
getSipSessionCounter in interface SipManagerpublic int getActiveSipSessions()
getActiveSipSessions in interface SipManagerpublic int getSipSessionMaxAliveTime()
getSipSessionMaxAliveTime in interface SipManagerpublic void setSipSessionMaxAliveTime(int sipSessionMaxAliveTime)
setSipSessionMaxAliveTime in interface SipManagersessionMaxAliveTime - Longest time (in seconds) that an expired session had been
alive.public int getSipSessionAverageAliveTime()
getSipSessionAverageAliveTime in interface SipManagerpublic void setSipSessionAverageAliveTime(int sipSessionAverageAliveTime)
setSipSessionAverageAliveTime in interface SipManagersessionAverageAliveTime - Average time (in seconds) that expired sessions had been
alive.public void setSipApplicationSessionCounter(int sipApplicationSessionCounter)
setSipApplicationSessionCounter in interface SipManagerpublic int getSipApplicationSessionCounter()
getSipApplicationSessionCounter in interface SipManagerpublic int getActiveSipApplicationSessions()
getActiveSipApplicationSessions in interface SipManagerpublic int getSipApplicationSessionMaxAliveTime()
getSipApplicationSessionMaxAliveTime in interface SipManagerpublic void setSipApplicationSessionMaxAliveTime(int sipApplicationSessionMaxAliveTime)
setSipApplicationSessionMaxAliveTime in interface SipManagersessionMaxAliveTime - Longest time (in seconds) that an expired session had been
alive.public int getSipApplicationSessionAverageAliveTime()
getSipApplicationSessionAverageAliveTime in interface SipManagerpublic void setSipApplicationSessionAverageAliveTime(int sipApplicationSessionAverageAliveTime)
setSipApplicationSessionAverageAliveTime in interface SipManagersessionAverageAliveTime - Average time (in seconds) that expired sessions had been
alive.public int getExpiredSipSessions()
getExpiredSipSessions in interface SipManagerpublic void setExpiredSipSessions(int expiredSipSessions)
setExpiredSipSessions in interface SipManagerexpiredSessions - Number of sessions that have expiredpublic int getExpiredSipApplicationSessions()
getExpiredSipApplicationSessions in interface SipManagerpublic void setExpiredSipApplicationSessions(int expiredSipApplicationSessions)
setExpiredSipApplicationSessions in interface SipManagerexpiredSessions - Number of sessions that have expiredpublic java.lang.String listSipSessionIds()
public java.lang.String listSipApplicationSessionIds()
public double getNumberOfSipApplicationSessionCreationPerSecond()
SipManager
getNumberOfSipApplicationSessionCreationPerSecond in interface SipManagerpublic double getNumberOfSipSessionCreationPerSecond()
SipManager
getNumberOfSipSessionCreationPerSecond in interface SipManagerpublic void updateStats()
SipManager
updateStats in interface SipManager
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||