org.mobicents.servlet.sip.core.session
Interface SipManager

All Superinterfaces:
org.apache.catalina.Manager
All Known Subinterfaces:
DistributableSipManager
All Known Implementing Classes:
SipStandardManager

public interface SipManager
extends org.apache.catalina.Manager

A SipManager manages the Sip Sessions that are associated with a particular Container. Different Manager implementations may support value-added features such as the persistent storage of sip session data, as well as migrating sip sessions for distributable sip applications.

In order for a SipManager implementation to successfully operate with a SipContext implementation that implements reloading, it must obey the following constraints:

Author:
Jean Deruelle

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()
           
 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.
 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 MobicentsSipApplicationSession)
          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 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 interface org.apache.catalina.Manager
add, addPropertyChangeListener, backgroundProcess, changeSessionId, createEmptySession, createSession, findSession, findSessions, getActiveSessions, getContainer, getDistributable, getExpiredSessions, getInfo, getMaxActive, getMaxInactiveInterval, getRejectedSessions, getSessionAverageAliveTime, getSessionCounter, getSessionCreateRate, getSessionExpireRate, getSessionIdLength, getSessionMaxAliveTime, load, remove, remove, removePropertyChangeListener, setContainer, setDistributable, setExpiredSessions, setMaxActive, setMaxInactiveInterval, setSessionCounter, setSessionIdLength, setSessionMaxAliveTime, unload
 

Method Detail

removeSipSession

MobicentsSipSession removeSipSession(SipSessionKey key)
Removes a sip session from the manager by its key

Parameters:
key - the identifier for this session
Returns:
the sip session that had just been removed, null otherwise

removeSipApplicationSession

MobicentsSipApplicationSession removeSipApplicationSession(SipApplicationSessionKey key)
Removes a sip application session from the manager by its key

Parameters:
key - the identifier for this session
Returns:
the sip application session that had just been removed, null otherwise

getSipApplicationSession

MobicentsSipApplicationSession getSipApplicationSession(SipApplicationSessionKey key,
                                                        boolean create)
Retrieve a sip application session from its key. If none exists, one can enforce the creation through the create parameter to true.

Parameters:
key - the key identifying the sip application session to retrieve
create - if set to true, if no session has been found one will be created
Returns:
the sip application session matching the key

getSipSession

MobicentsSipSession getSipSession(SipSessionKey key,
                                  boolean create,
                                  SipFactoryImpl sipFactoryImpl,
                                  MobicentsSipApplicationSession MobicentsSipApplicationSession)
Retrieve a sip session from its key. If none exists, one can enforce the creation through the create parameter to true. the sip factory cannot be null if create is set to true.

Parameters:
key - the key identifying the sip session to retrieve
create - if set to true, if no session has been found one will be created
sipFactoryImpl - needed only for sip session creation.
MobicentsSipApplicationSession - to associate the SipSession with if create is set to true, if false it won't be used
Returns:
the sip session matching the key
Throws:
java.lang.IllegalArgumentException - if create is set to true and sip Factory is null

findSipApplicationSession

MobicentsSipApplicationSession findSipApplicationSession(javax.servlet.http.HttpSession httpSession)
Retrieves the sip application session holding the converged http session in parameter

Parameters:
convergedHttpSession - the converged session to look up
Returns:
the sip application session holding a reference to it or null if none references it

removeAllSessions

void removeAllSessions()
Remove the sip sessions and sip application sessions


setSipFactoryImpl

void setSipFactoryImpl(SipFactoryImpl sipFactoryImpl)

getSipFactoryImpl

SipFactoryImpl getSipFactoryImpl()

dumpSipSessions

void dumpSipSessions()

dumpSipApplicationSessions

void dumpSipApplicationSessions()

getAllSipSessions

java.util.Iterator<MobicentsSipSession> getAllSipSessions()

getAllSipApplicationSessions

java.util.Iterator<MobicentsSipApplicationSession> getAllSipApplicationSessions()

getMaxActiveSipSessions

int getMaxActiveSipSessions()
Return the maximum number of active Sessions allowed, or -1 for no limit.


setMaxActiveSipSessions

void setMaxActiveSipSessions(int max)
Set the maximum number of actives Sip Sessions allowed, or -1 for no limit.

Parameters:
max - The new maximum number of sip sessions

getMaxActiveSipApplicationSessions

int getMaxActiveSipApplicationSessions()
Return the maximum number of active Sessions allowed, or -1 for no limit.


setMaxActiveSipApplicationSessions

void setMaxActiveSipApplicationSessions(int max)
Set the maximum number of actives Sip Application Sessions allowed, or -1 for no limit.

Parameters:
max - The new maximum number of sip application sessions

getRejectedSipSessions

int getRejectedSipSessions()
Number of sip session creations that failed due to maxActiveSipSessions

Returns:
The count

setRejectedSipSessions

void setRejectedSipSessions(int rejectedSipSessions)

getRejectedSipApplicationSessions

int getRejectedSipApplicationSessions()
Number of sip session creations that failed due to maxActiveSipSessions

Returns:
The count

setRejectedSipApplicationSessions

void setRejectedSipApplicationSessions(int rejectedSipApplicationSessions)

setSipSessionCounter

void setSipSessionCounter(int sipSessionCounter)

getSipSessionCounter

int getSipSessionCounter()
Total sessions created by this manager.

Returns:
sessions created

getActiveSipSessions

int getActiveSipSessions()
Returns the number of active sessions

Returns:
number of sessions active

getSipSessionMaxAliveTime

int getSipSessionMaxAliveTime()
Gets the longest time (in seconds) that an expired session had been alive.

Returns:
Longest time (in seconds) that an expired session had been alive.

setSipSessionMaxAliveTime

void setSipSessionMaxAliveTime(int sipSessionMaxAliveTime)
Sets the longest time (in seconds) that an expired session had been alive.

Parameters:
sessionMaxAliveTime - Longest time (in seconds) that an expired session had been alive.

getSipSessionAverageAliveTime

int getSipSessionAverageAliveTime()
Gets the average time (in seconds) that expired sessions had been alive.

Returns:
Average time (in seconds) that expired sessions had been alive.

setSipSessionAverageAliveTime

void setSipSessionAverageAliveTime(int sipSessionAverageAliveTime)
Sets the average time (in seconds) that expired sessions had been alive.

Parameters:
sessionAverageAliveTime - Average time (in seconds) that expired sessions had been alive.

setSipApplicationSessionCounter

void setSipApplicationSessionCounter(int sipApplicationSessionCounter)

getSipApplicationSessionCounter

int getSipApplicationSessionCounter()
Total sessions created by this manager.

Returns:
sessions created

getActiveSipApplicationSessions

int getActiveSipApplicationSessions()
Returns the number of active sessions

Returns:
number of sessions active

getSipApplicationSessionMaxAliveTime

int getSipApplicationSessionMaxAliveTime()
Gets the longest time (in seconds) that an expired session had been alive.

Returns:
Longest time (in seconds) that an expired session had been alive.

setSipApplicationSessionMaxAliveTime

void setSipApplicationSessionMaxAliveTime(int sipApplicationSessionMaxAliveTime)
Sets the longest time (in seconds) that an expired session had been alive.

Parameters:
sessionMaxAliveTime - Longest time (in seconds) that an expired session had been alive.

getSipApplicationSessionAverageAliveTime

int getSipApplicationSessionAverageAliveTime()
Gets the average time (in seconds) that expired sessions had been alive.

Returns:
Average time (in seconds) that expired sessions had been alive.

setSipApplicationSessionAverageAliveTime

void setSipApplicationSessionAverageAliveTime(int sipApplicationSessionAverageAliveTime)
Sets the average time (in seconds) that expired sessions had been alive.

Parameters:
sessionAverageAliveTime - Average time (in seconds) that expired sessions had been alive.

getExpiredSipSessions

int getExpiredSipSessions()
Gets the number of sessions that have expired.

Returns:
Number of sessions that have expired

setExpiredSipSessions

void setExpiredSipSessions(int expiredSipSessions)
Sets the number of sessions that have expired.

Parameters:
expiredSessions - Number of sessions that have expired

getExpiredSipApplicationSessions

int getExpiredSipApplicationSessions()
Gets the number of sessions that have expired.

Returns:
Number of sessions that have expired

setExpiredSipApplicationSessions

void setExpiredSipApplicationSessions(int expiredSipApplicationSessions)
Sets the number of sessions that have expired.

Parameters:
expiredSessions - Number of sessions that have expired

getNumberOfSipApplicationSessionCreationPerSecond

double getNumberOfSipApplicationSessionCreationPerSecond()
Gets the number of sip application sessions per seconds that have been created.

Returns:
number of sip application sessions per seconds that have been created.

getNumberOfSipSessionCreationPerSecond

double getNumberOfSipSessionCreationPerSecond()
Gets the number of sip sessions per seconds that have been created.

Returns:
number of sip sessions per seconds that have been created.

updateStats

void updateStats()
Update statistics



Copyright © 2011. All Rights Reserved.