|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mobicents.servlet.sip.core.session.SipManagerDelegate
public abstract class SipManagerDelegate
This class handles the management of sip sessions and sip application sessions for a given container (context) It is a delegate since it is used by many manager implementations classes (Standard and clustered ones)
| Field Summary | |
|---|---|
protected org.apache.catalina.Container |
container
|
protected int |
expiredSipApplicationSessions
Number of sip application sessions that have expired. |
protected int |
expiredSipSessions
Number of sip sessions that have expired. |
protected int |
maxActiveSipApplicationSessions
The maximum number of active Sip Application Sessions allowed, or -1 for no limit. |
protected int |
maxActiveSipSessions
The maximum number of active Sip Sessions allowed, or -1 for no limit. |
protected int |
rejectedSipApplicationSessions
Number of sip application session creations that failed due to maxActiveSipApplicationSessions. |
protected int |
rejectedSipSessions
Number of sip session creations that failed due to maxActiveSipSessions. |
protected int |
sipApplicationSessionAverageAliveTime
Average time (in seconds) that expired Sip Application Sessions had been alive. |
protected int |
sipApplicationSessionCounter
|
protected int |
sipApplicationSessionMaxAliveTime
The longest time (in seconds) that an expired Sip Application session had been alive. |
protected java.util.concurrent.ConcurrentHashMap<SipApplicationSessionKey,MobicentsSipApplicationSession> |
sipApplicationSessions
|
protected SipFactoryImpl |
sipFactoryImpl
|
protected int |
sipSessionAverageAliveTime
Average time (in seconds) that expired sip sessions had been alive. |
protected int |
sipSessionCounter
|
protected int |
sipSessionMaxAliveTime
The longest time (in seconds) that an expired sip session had been alive. |
protected java.util.concurrent.ConcurrentHashMap<SipSessionKey,MobicentsSipSession> |
sipSessions
|
| Constructor Summary | |
|---|---|
SipManagerDelegate()
|
|
| Method Summary | |
|---|---|
void |
changeSessionKey(SipSessionKey oldKey,
SipSessionKey newKey)
|
protected MobicentsSipSession |
createDerivedSipSession(MobicentsSipSession parentSipSession,
SipSessionKey sessionKey)
clone the parent sip session given in parameter except its attributes (they will be shared) and add it to the internal map of derived sessions identifying it by its ToTag |
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()
Retrieve all sip application sessions currently hold by the session manager |
java.util.Iterator<MobicentsSipSession> |
getAllSipSessions()
Retrieve all sip sessions currently hold by the session manager |
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. |
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. |
protected abstract MobicentsSipApplicationSession |
getNewMobicentsSipApplicationSession(SipApplicationSessionKey key,
SipContext sipContext)
|
protected abstract MobicentsSipSession |
getNewMobicentsSipSession(SipSessionKey key,
SipFactoryImpl sipFactoryImpl,
MobicentsSipApplicationSession mobicentsSipApplicationSession)
|
int |
getNumberOfSipApplicationSessions()
Retrieve all sip application sessions currently hold by the session manager |
int |
getNumberOfSipSessions()
Retrieve all sip sessions currently hold by the session manager |
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 |
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected java.util.concurrent.ConcurrentHashMap<SipApplicationSessionKey,MobicentsSipApplicationSession> sipApplicationSessions
protected java.util.concurrent.ConcurrentHashMap<SipSessionKey,MobicentsSipSession> sipSessions
protected SipFactoryImpl sipFactoryImpl
protected org.apache.catalina.Container container
protected int maxActiveSipSessions
protected int maxActiveSipApplicationSessions
protected int rejectedSipSessions
protected int rejectedSipApplicationSessions
protected int sipSessionMaxAliveTime
protected int sipSessionAverageAliveTime
protected int expiredSipSessions
protected int sipApplicationSessionMaxAliveTime
protected int sipApplicationSessionAverageAliveTime
protected int expiredSipApplicationSessions
protected int sipSessionCounter
protected int sipApplicationSessionCounter
| Constructor Detail |
|---|
public SipManagerDelegate()
| Method Detail |
|---|
public SipFactoryImpl getSipFactoryImpl()
public void setSipFactoryImpl(SipFactoryImpl sipFactoryImpl)
sipFactoryImpl - the SipFactoryImpl to setpublic org.apache.catalina.Container getContainer()
public void setContainer(org.apache.catalina.Container container)
container - the container to setpublic MobicentsSipSession removeSipSession(SipSessionKey key)
key - the identifier for this session
public MobicentsSipApplicationSession removeSipApplicationSession(SipApplicationSessionKey key)
key - the identifier for this session
public MobicentsSipApplicationSession getSipApplicationSession(SipApplicationSessionKey key,
boolean create)
key - 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)
key - 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
java.lang.IllegalArgumentException - if create is set to true and sip Factory is null
public void changeSessionKey(SipSessionKey oldKey,
SipSessionKey newKey)
protected MobicentsSipSession createDerivedSipSession(MobicentsSipSession parentSipSession,
SipSessionKey sessionKey)
parentSipSession - the parent sip session holding the newly created derived sessionsessionKey - the key of the new derived session to create
public java.util.Iterator<MobicentsSipSession> getAllSipSessions()
public int getNumberOfSipApplicationSessions()
public int getNumberOfSipSessions()
public java.util.Iterator<MobicentsSipApplicationSession> getAllSipApplicationSessions()
public MobicentsSipApplicationSession findSipApplicationSession(javax.servlet.http.HttpSession httpSession)
convergedHttpSession - the converged session to look up
public void dumpSipSessions()
public void dumpSipApplicationSessions()
public void removeAllSessions()
protected abstract MobicentsSipSession getNewMobicentsSipSession(SipSessionKey key,
SipFactoryImpl sipFactoryImpl,
MobicentsSipApplicationSession mobicentsSipApplicationSession)
protected abstract MobicentsSipApplicationSession getNewMobicentsSipApplicationSession(SipApplicationSessionKey key,
SipContext sipContext)
public int getMaxActiveSipSessions()
public void setMaxActiveSipSessions(int max)
max - The new maximum number of sip sessionspublic int getMaxActiveSipApplicationSessions()
public void setMaxActiveSipApplicationSessions(int max)
max - The new maximum number of sip application sessionspublic int getRejectedSipSessions()
public void setRejectedSipSessions(int rejectedSipSessions)
public int getRejectedSipApplicationSessions()
public void setRejectedSipApplicationSessions(int rejectedSipApplicationSessions)
public void setSipSessionCounter(int sipSessionCounter)
public int getSipSessionCounter()
public int getActiveSipSessions()
public int getSipSessionMaxAliveTime()
public void setSipSessionMaxAliveTime(int sipSessionMaxAliveTime)
sessionMaxAliveTime - Longest time (in seconds) that an expired session had been
alive.public int getSipSessionAverageAliveTime()
public void setSipSessionAverageAliveTime(int sipSessionAverageAliveTime)
sessionAverageAliveTime - Average time (in seconds) that expired sessions had been
alive.public void setSipApplicationSessionCounter(int sipApplicationSessionCounter)
public int getSipApplicationSessionCounter()
public int getActiveSipApplicationSessions()
public int getSipApplicationSessionMaxAliveTime()
public void setSipApplicationSessionMaxAliveTime(int sipApplicationSessionMaxAliveTime)
sessionMaxAliveTime - Longest time (in seconds) that an expired session had been
alive.public int getSipApplicationSessionAverageAliveTime()
public void setSipApplicationSessionAverageAliveTime(int sipApplicationSessionAverageAliveTime)
sessionAverageAliveTime - Average time (in seconds) that expired sessions had been
alive.public int getExpiredSipSessions()
public void setExpiredSipSessions(int expiredSipSessions)
expiredSessions - Number of sessions that have expiredpublic int getExpiredSipApplicationSessions()
public void setExpiredSipApplicationSessions(int expiredSipApplicationSessions)
expiredSessions - Number of sessions that have expired
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||