|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mobicents.servlet.sip.core.SipApplicationDispatcherImpl
public class SipApplicationDispatcherImpl
Implementation of the SipApplicationDispatcher interface. Central point getting the sip messages from the different stacks for a Tomcat Service(Engine), translating jain sip SIP messages to sip servlets SIP messages, creating a MessageRouter responsible for choosing which Dispatcher will be used for routing the message and dispatches the messages.
| Nested Class Summary | |
|---|---|
class |
SipApplicationDispatcherImpl.CongestionControlTimerTask
Timer task that will gather information about congestion control |
| Field Summary | |
|---|---|
protected java.util.concurrent.ScheduledFuture |
congestionControlTimerFuture
|
protected SipApplicationDispatcherImpl.CongestionControlTimerTask |
congestionControlTimerTask
|
protected java.lang.String |
domain
|
protected javax.management.MBeanServer |
mserver
|
protected javax.management.ObjectName |
oname
|
| Fields inherited from interface org.mobicents.servlet.sip.core.SipApplicationDispatcher |
|---|
EXTENSIONS_SUPPORTED, RFC_SUPPORTED |
| Constructor Summary | |
|---|---|
SipApplicationDispatcherImpl()
|
|
| Method Summary | |
|---|---|
void |
addHostName(java.lang.String hostName)
Add a new hostname to the application dispatcher. |
void |
addSipApplication(java.lang.String sipApplicationName,
SipContext sipApplication)
Add a new sip application to which sip messages can be routed |
java.util.Set<java.lang.String> |
findHostNames()
Returns An immutable instance of the java.util.List interface containing the sip application dispatcher registered host names |
java.lang.String[] |
findInstalledSipApplications()
|
SipContext |
findSipApplication(java.lang.String applicationName)
Find the sip application to which sip messages can currently be routed by its name |
java.util.Iterator<SipContext> |
findSipApplications()
Find the sip applications to which sip messages can currently be routed |
java.util.concurrent.ThreadPoolExecutor |
getAsynchronousExecutor()
|
ConcurrencyControlMode |
getConcurrencyControlMode()
|
long |
getCongestionControlCheckingInterval()
|
CongestionControlPolicy |
getCongestionControlPolicy()
|
java.lang.String |
getDomain()
|
java.util.Map<java.lang.String,java.lang.String> |
getMdToApplicationName()
|
int |
getMemoryThreshold()
|
SipApplicationRouterInfo |
getNextInterestedApplication(SipServletRequestImpl sipServletRequest)
|
int |
getNumberOfMessagesInQueue()
|
int |
getNumberOfPendingMessages()
|
javax.management.ObjectName |
getObjectName()
|
java.util.List<SipURI> |
getOutboundInterfaces()
Returns An immutable instance of the java.util.List interface containing the SipURI representation of IP addresses which are used by the container to send out the messages. |
double |
getPercentageOfMemoryUsed()
|
int |
getQueueSize()
|
long |
getRequestsProcessed()
|
long |
getResponsesProcessed()
|
SipApplicationRouter |
getSipApplicationRouter()
|
SipFactoryImpl |
getSipFactory()
retrieve the sip factory |
SipNetworkInterfaceManager |
getSipNetworkInterfaceManager()
Retrieve the manager for the sip network interfaces for this application dispatcher |
void |
init()
Initialize the sip application dispatcher. |
boolean |
isExternal(java.lang.String host,
int port,
java.lang.String transport)
Check whether or not the triplet host, port and transport are corresponding to an interface |
boolean |
isRouteExternal(javax.sip.header.RouteHeader routeHeader)
Check if the route is external |
boolean |
isViaHeaderExternal(javax.sip.header.ViaHeader viaHeader)
Check if the via header is external |
void |
postDeregister()
|
void |
postRegister(java.lang.Boolean registrationDone)
|
void |
preDeregister()
|
javax.management.ObjectName |
preRegister(javax.management.MBeanServer server,
javax.management.ObjectName name)
|
void |
processDialogTerminated(javax.sip.DialogTerminatedEvent dialogTerminatedEvent)
|
void |
processIOException(javax.sip.IOExceptionEvent arg0)
|
void |
processRequest(javax.sip.RequestEvent requestEvent)
|
void |
processResponse(javax.sip.ResponseEvent responseEvent)
|
void |
processTimeout(javax.sip.TimeoutEvent timeoutEvent)
|
void |
processTransactionTerminated(javax.sip.TransactionTerminatedEvent transactionTerminatedEvent)
|
void |
removeHostName(java.lang.String hostName)
Remove the hostname from the application dispatcher. |
SipContext |
removeSipApplication(java.lang.String sipApplicationName)
Remove a sip application to which sip messages can be routed |
java.lang.Object |
retrieveApplicationRouterConfiguration()
|
void |
setConcurrencyControlMode(ConcurrencyControlMode concurrencyControlMode)
|
void |
setConcurrencyControlModeByName(java.lang.String concurrencyControlMode)
|
void |
setCongestionControlCheckingInterval(long congestionControlCheckingInterval)
|
void |
setCongestionControlPolicy(CongestionControlPolicy congestionControlPolicy)
|
void |
setCongestionControlPolicyByName(java.lang.String congestionControlPolicy)
|
void |
setDomain(java.lang.String domain)
|
void |
setMemoryThreshold(int memoryThreshold)
|
void |
setQueueSize(int queueSize)
|
void |
setSipApplicationRouter(SipApplicationRouter sipApplicationRouter)
|
void |
start()
Start the sip application dispatcher |
void |
stop()
Stop the sip application dispatcher |
void |
updateApplicationRouterConfiguration(java.lang.Object configuration)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected transient SipApplicationDispatcherImpl.CongestionControlTimerTask congestionControlTimerTask
protected transient java.util.concurrent.ScheduledFuture congestionControlTimerFuture
protected java.lang.String domain
protected javax.management.ObjectName oname
protected javax.management.MBeanServer mserver
| Constructor Detail |
|---|
public SipApplicationDispatcherImpl()
| Method Detail |
|---|
public void init()
throws org.apache.catalina.LifecycleException
init in interface SipApplicationDispatcherorg.apache.catalina.LifecycleException - The Sip Application Router cannot be initialized correctlypublic void start()
start in interface SipApplicationDispatcherpublic void stop()
stop in interface SipApplicationDispatcher
public void addSipApplication(java.lang.String sipApplicationName,
SipContext sipApplication)
addSipApplication in interface SipApplicationDispatchersipApplicationName - the sip application logical namesipApplication - the sip context representing the applicationpublic SipContext removeSipApplication(java.lang.String sipApplicationName)
removeSipApplication in interface SipApplicationDispatchersipApplicationName - the sip application logical name of the application to removepublic void processIOException(javax.sip.IOExceptionEvent arg0)
processIOException in interface javax.sip.SipListenerpublic int getNumberOfPendingMessages()
public void processRequest(javax.sip.RequestEvent requestEvent)
processRequest in interface javax.sip.SipListenerpublic void processResponse(javax.sip.ResponseEvent responseEvent)
processResponse in interface javax.sip.SipListenerpublic void processDialogTerminated(javax.sip.DialogTerminatedEvent dialogTerminatedEvent)
processDialogTerminated in interface javax.sip.SipListenerpublic void processTimeout(javax.sip.TimeoutEvent timeoutEvent)
processTimeout in interface javax.sip.SipListenerpublic void processTransactionTerminated(javax.sip.TransactionTerminatedEvent transactionTerminatedEvent)
processTransactionTerminated in interface javax.sip.SipListenerpublic java.util.Map<java.lang.String,java.lang.String> getMdToApplicationName()
getMdToApplicationName in interface SipApplicationDispatcherpublic final boolean isRouteExternal(javax.sip.header.RouteHeader routeHeader)
isRouteExternal in interface SipApplicationDispatcherrouteHeader - the route to check
public final boolean isViaHeaderExternal(javax.sip.header.ViaHeader viaHeader)
isViaHeaderExternal in interface SipApplicationDispatcherviaHeader - the via header to check
public final boolean isExternal(java.lang.String host,
int port,
java.lang.String transport)
isExternal in interface SipApplicationDispatcherhost - can be hostname or ipaddressport - port numbertransport - transport used
public SipApplicationRouter getSipApplicationRouter()
getSipApplicationRouter in interface SipApplicationDispatcherpublic void setSipApplicationRouter(SipApplicationRouter sipApplicationRouter)
sipApplicationRouter - the sipApplicationRouter to setpublic SipNetworkInterfaceManager getSipNetworkInterfaceManager()
SipApplicationDispatcher
getSipNetworkInterfaceManager in interface SipApplicationDispatcherpublic SipFactoryImpl getSipFactory()
SipApplicationDispatcher
getSipFactory in interface SipApplicationDispatcherpublic java.util.List<SipURI> getOutboundInterfaces()
SipApplicationDispatcher
getOutboundInterfaces in interface SipApplicationDispatcherpublic void addHostName(java.lang.String hostName)
SipApplicationDispatcher
addHostName in interface SipApplicationDispatcherhostName - the host namepublic java.util.Set<java.lang.String> findHostNames()
SipApplicationDispatcher
findHostNames in interface SipApplicationDispatcherpublic void removeHostName(java.lang.String hostName)
SipApplicationDispatcher
removeHostName in interface SipApplicationDispatcherhostName - the host namepublic SipApplicationRouterInfo getNextInterestedApplication(SipServletRequestImpl sipServletRequest)
getNextInterestedApplication in interface SipApplicationDispatcherpublic java.util.concurrent.ThreadPoolExecutor getAsynchronousExecutor()
public java.util.Iterator<SipContext> findSipApplications()
SipApplicationDispatcher
findSipApplications in interface SipApplicationDispatcherpublic SipContext findSipApplication(java.lang.String applicationName)
SipApplicationDispatcher
findSipApplication in interface SipApplicationDispatcherapplicationName - the name of the application
public javax.management.ObjectName getObjectName()
public java.lang.String getDomain()
getDomain in interface SipApplicationDispatcherpublic void setDomain(java.lang.String domain)
setDomain in interface SipApplicationDispatcherpublic void postDeregister()
postDeregister in interface javax.management.MBeanRegistrationpublic void postRegister(java.lang.Boolean registrationDone)
postRegister in interface javax.management.MBeanRegistration
public void preDeregister()
throws java.lang.Exception
preDeregister in interface javax.management.MBeanRegistrationjava.lang.Exception
public javax.management.ObjectName preRegister(javax.management.MBeanServer server,
javax.management.ObjectName name)
throws java.lang.Exception
preRegister in interface javax.management.MBeanRegistrationjava.lang.Exceptionpublic java.lang.String[] findInstalledSipApplications()
public java.lang.Object retrieveApplicationRouterConfiguration()
public void updateApplicationRouterConfiguration(java.lang.Object configuration)
public ConcurrencyControlMode getConcurrencyControlMode()
getConcurrencyControlMode in interface SipApplicationDispatcherpublic void setConcurrencyControlMode(ConcurrencyControlMode concurrencyControlMode)
setConcurrencyControlMode in interface SipApplicationDispatcherpublic int getQueueSize()
getQueueSize in interface SipApplicationDispatcherpublic void setQueueSize(int queueSize)
setQueueSize in interface SipApplicationDispatcherpublic void setConcurrencyControlModeByName(java.lang.String concurrencyControlMode)
setConcurrencyControlModeByName in interface SipApplicationDispatcherpublic long getRequestsProcessed()
public long getResponsesProcessed()
public void setCongestionControlCheckingInterval(long congestionControlCheckingInterval)
setCongestionControlCheckingInterval in interface SipApplicationDispatchercongestionControlCheckingInterval - the congestionControlCheckingInterval to setpublic long getCongestionControlCheckingInterval()
getCongestionControlCheckingInterval in interface SipApplicationDispatcherpublic void setCongestionControlPolicy(CongestionControlPolicy congestionControlPolicy)
setCongestionControlPolicy in interface SipApplicationDispatchercongestionControlPolicy - the congestionControlPolicy to setpublic void setCongestionControlPolicyByName(java.lang.String congestionControlPolicy)
setCongestionControlPolicyByName in interface SipApplicationDispatcherpublic CongestionControlPolicy getCongestionControlPolicy()
getCongestionControlPolicy in interface SipApplicationDispatcherpublic void setMemoryThreshold(int memoryThreshold)
setMemoryThreshold in interface SipApplicationDispatchermemoryThreshold - the memoryThreshold to setpublic int getMemoryThreshold()
getMemoryThreshold in interface SipApplicationDispatcherpublic int getNumberOfMessagesInQueue()
getNumberOfMessagesInQueue in interface SipApplicationDispatcherpublic double getPercentageOfMemoryUsed()
getPercentageOfMemoryUsed in interface SipApplicationDispatcher
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||