|
||||||||||
| 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 java.util.concurrent.ConcurrentHashMap<SipApplicationSessionKey,MobicentsSipApplicationSession> |
sipApplicationSessions
|
protected SipFactoryImpl |
sipFactoryImpl
|
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 |
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()
|
protected abstract MobicentsSipApplicationSession |
getNewMobicentsSipApplicationSession(SipApplicationSessionKey key,
SipContext sipContext)
|
protected abstract MobicentsSipSession |
getNewMobicentsSipSession(SipSessionKey key,
SipFactoryImpl sipFactoryImpl,
MobicentsSipApplicationSession mobicentsSipApplicationSession)
|
MobicentsSipApplicationSession |
getSipApplicationSession(SipApplicationSessionKey key,
boolean create)
Retrieve a sip application session from its key. |
SipFactoryImpl |
getSipFactoryImpl()
|
MobicentsSipSession |
getSipSession(SipSessionKey key,
boolean create,
SipFactoryImpl sipFactoryImpl,
MobicentsSipApplicationSession sipApplicationSessionImpl)
Retrieve a sip session from its key. |
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 |
setSipFactoryImpl(SipFactoryImpl sipFactoryImpl)
|
| 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
| 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 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)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||