public abstract class SipManagerDelegate extends Object
| Modifier and Type | Field and Description |
|---|---|
protected SipContext |
container |
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 |
sipApplicationSessionCounter |
protected ConcurrentHashMap<SipApplicationSessionKey,MobicentsSipApplicationSession> |
sipApplicationSessions |
protected ConcurrentHashMap<String,MobicentsSipApplicationSession> |
sipApplicationSessionsByAppGeneratedKey |
protected SipFactoryImpl |
sipFactoryImpl |
protected int |
sipSessionCounter |
protected ConcurrentHashMap<SipSessionKey,MobicentsSipSession> |
sipSessions |
| Constructor and Description |
|---|
SipManagerDelegate() |
| Modifier and Type | Method and Description |
|---|---|
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
|
protected MobicentsSipApplicationSession |
createSipApplicationSession(SipApplicationSessionKey key) |
protected MobicentsSipSession |
createSipSession(SipSessionKey key,
boolean create,
SipFactoryImpl sipFactoryImpl,
MobicentsSipApplicationSession sipApplicationSessionImpl) |
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
|
Iterator<MobicentsSipApplicationSession> |
getAllSipApplicationSessions()
Retrieve all sip application sessions currently hold by the session manager
|
Iterator<MobicentsSipSession> |
getAllSipSessions()
Retrieve all sip sessions currently hold by the session manager
|
SipContext |
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) |
double |
getNumberOfSipApplicationSessionCreationPerSecond() |
int |
getNumberOfSipApplicationSessions()
Retrieve all sip application sessions currently hold by the session manager
|
double |
getNumberOfSipSessionCreationPerSecond() |
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(MobicentsSipApplicationSessionKey key)
Removes a sip application session from the manager by its key
|
MobicentsSipSession |
removeSipSession(MobicentsSipSessionKey key)
Removes a sip session from the manager by its key
|
protected void |
scheduleExpirationTimer(MobicentsSipApplicationSession sipApplicationSession) |
void |
setContainer(SipContext 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.
|
protected MobicentsSipSession |
setToTag(SipSessionKey key,
MobicentsSipSession sipSession) |
void |
updateStats() |
protected ConcurrentHashMap<SipApplicationSessionKey,MobicentsSipApplicationSession> sipApplicationSessions
protected ConcurrentHashMap<String,MobicentsSipApplicationSession> sipApplicationSessionsByAppGeneratedKey
protected ConcurrentHashMap<SipSessionKey,MobicentsSipSession> sipSessions
protected SipFactoryImpl sipFactoryImpl
protected SipContext container
protected int maxActiveSipSessions
protected int maxActiveSipApplicationSessions
protected int rejectedSipSessions
protected int rejectedSipApplicationSessions
protected int sipSessionCounter
protected int sipApplicationSessionCounter
public SipFactoryImpl getSipFactoryImpl()
public void setSipFactoryImpl(SipFactoryImpl sipFactoryImpl)
sipFactoryImpl - the SipFactoryImpl to setpublic SipContext getContainer()
public void setContainer(SipContext container)
container - the container to setpublic MobicentsSipSession removeSipSession(MobicentsSipSessionKey key)
key - the identifier for this sessionpublic MobicentsSipApplicationSession removeSipApplicationSession(MobicentsSipApplicationSessionKey key)
key - the identifier for this sessionpublic 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 createdprotected MobicentsSipApplicationSession createSipApplicationSession(SipApplicationSessionKey key)
protected void scheduleExpirationTimer(MobicentsSipApplicationSession sipApplicationSession)
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 usedIllegalArgumentException - if create is set to true and sip Factory is nullprotected MobicentsSipSession createSipSession(SipSessionKey key, boolean create, SipFactoryImpl sipFactoryImpl, MobicentsSipApplicationSession sipApplicationSessionImpl)
protected MobicentsSipSession setToTag(SipSessionKey key, MobicentsSipSession sipSession)
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 createpublic Iterator<MobicentsSipSession> getAllSipSessions()
public int getNumberOfSipApplicationSessions()
public int getNumberOfSipSessions()
public Iterator<MobicentsSipApplicationSession> getAllSipApplicationSessions()
public MobicentsSipApplicationSession findSipApplicationSession(javax.servlet.http.HttpSession httpSession)
convergedHttpSession - the converged session to look uppublic 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 expiredpublic double getNumberOfSipApplicationSessionCreationPerSecond()
public double getNumberOfSipSessionCreationPerSecond()
public void updateStats()
Copyright © 2014. All Rights Reserved.