|
||||||||||
| 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
|
protected javax.sip.SipStack |
sipStack
|
| 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()
Serialize the state info in memory and deserialize it and return the new object. |
java.lang.String |
getApplicationNameFromHash(java.lang.String hash)
|
java.util.concurrent.ThreadPoolExecutor |
getAsynchronousExecutor()
|
int |
getBackToNormalMemoryThreshold()
|
int |
getBackToNormalQueueSize()
|
int |
getBaseTimerInterval()
|
ConcurrencyControlMode |
getConcurrencyControlMode()
|
long |
getCongestionControlCheckingInterval()
|
CongestionControlPolicy |
getCongestionControlPolicy()
|
org.mobicents.ext.javax.sip.dns.DNSServerLocator |
getDNSServerLocator()
|
java.lang.String |
getDomain()
|
java.lang.String[] |
getExtensionsSupported()
|
boolean |
getGatherStatistics()
PRESENT TO ACCOMODATE JOPR. |
java.lang.String |
getHashFromApplicationName(java.lang.String appName)
|
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()
|
java.util.Map<java.lang.String,java.util.concurrent.atomic.AtomicLong> |
getRequestsProcessedByMethod()
|
long |
getRequestsProcessedByMethod(java.lang.String method)
|
long |
getResponsesProcessed()
|
java.util.Map<java.lang.String,java.util.concurrent.atomic.AtomicLong> |
getResponsesProcessedByStatusCode()
|
long |
getResponsesProcessedByStatusCode(java.lang.String statusCode)
|
java.lang.String[] |
getRfcSupported()
|
SipApplicationRouter |
getSipApplicationRouter()
|
SipFactoryImpl |
getSipFactory()
retrieve the sip factory |
SipNetworkInterfaceManager |
getSipNetworkInterfaceManager()
Retrieve the manager for the sip network interfaces for this application dispatcher |
javax.sip.SipStack |
getSipStack()
|
int |
getT2Interval()
|
int |
getT4Interval()
|
int |
getTimerDInterval()
|
java.lang.String |
getVersion()
|
void |
init()
Initialize the sip application dispatcher. |
boolean |
isBypassRequestExecutor()
|
boolean |
isBypassResponseExecutor()
|
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 |
isGatherStatistics()
|
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 |
loadBalancerAdded(org.mobicents.ha.javax.sip.SipLoadBalancer sipLoadBalancer)
|
void |
loadBalancerRemoved(org.mobicents.ha.javax.sip.SipLoadBalancer sipLoadBalancer)
|
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 |
processDialogTimeout(gov.nist.javax.sip.DialogTimeoutEvent timeoutEvent)
|
void |
processIOException(javax.sip.IOExceptionEvent event)
|
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()
|
java.io.Serializable |
retrieveApplicationRouterConfigurationString()
|
void |
sendSwitchoverInstruction(java.lang.String fromJvmRoute,
java.lang.String toJvmRoute)
|
void |
setBackToNormalMemoryThreshold(int backToNormalMemoryThreshold)
|
void |
setBackToNormalQueueSize(int backToNormalQueueSize)
|
void |
setBaseTimerInterval(int baseTimerInterval)
|
void |
setBypassRequestExecutor(boolean bypassRequestExecutor)
|
void |
setBypassResponseExecutor(boolean bypassResponseExecutor)
|
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 |
setDNSServerLocator(org.mobicents.ext.javax.sip.dns.DNSServerLocator dnsServerLocator)
|
void |
setDomain(java.lang.String domain)
|
void |
setGatherStatistics(boolean skipStatistics)
|
void |
setMemoryThreshold(int memoryThreshold)
|
void |
setQueueSize(int queueSize)
|
void |
setSipApplicationRouter(SipApplicationRouter sipApplicationRouter)
|
void |
setSipStack(javax.sip.SipStack sipStack)
|
void |
setT2Interval(int t2Interval)
|
void |
setT4Interval(int t4Interval)
|
void |
setTimerDInterval(int timerDInterval)
|
void |
start()
Start the sip application dispatcher |
protected void |
startSipStack()
|
void |
stop()
Stop the sip application dispatcher |
protected void |
stopSipStack()
|
void |
updateApplicationRouterConfiguration(java.lang.Object configuration)
|
void |
updateApplicationRouterConfiguration(java.io.Serializable configuration)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected javax.sip.SipStack sipStack
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 event)
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 processDialogTimeout(gov.nist.javax.sip.DialogTimeoutEvent timeoutEvent)
processDialogTimeout in interface gov.nist.javax.sip.SipListenerExtpublic 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.lang.String getApplicationNameFromHash(java.lang.String hash)
getApplicationNameFromHash in interface SipApplicationDispatcherpublic java.lang.String getHashFromApplicationName(java.lang.String appName)
getHashFromApplicationName 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()
getAsynchronousExecutor in interface SipApplicationDispatcherpublic java.util.Iterator<SipContext> findSipApplications()
findSipApplications in interface SipApplicationDispatcherstateInfo - the state info to serialize
public SipContext findSipApplication(java.lang.String applicationName)
SipApplicationDispatcher
findSipApplication in interface SipApplicationDispatcherapplicationName - the name of the application
public org.mobicents.ext.javax.sip.dns.DNSServerLocator getDNSServerLocator()
getDNSServerLocator in interface SipApplicationDispatcherpublic void setDNSServerLocator(org.mobicents.ext.javax.sip.dns.DNSServerLocator dnsServerLocator)
setDNSServerLocator in interface SipApplicationDispatcherpublic 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 java.io.Serializable retrieveApplicationRouterConfigurationString()
public void updateApplicationRouterConfiguration(java.io.Serializable 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 java.util.Map<java.lang.String,java.util.concurrent.atomic.AtomicLong> getRequestsProcessedByMethod()
public java.util.Map<java.lang.String,java.util.concurrent.atomic.AtomicLong> getResponsesProcessedByStatusCode()
public long getRequestsProcessedByMethod(java.lang.String method)
public long getResponsesProcessedByStatusCode(java.lang.String statusCode)
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 SipApplicationDispatcherpublic void setBypassRequestExecutor(boolean bypassRequestExecutor)
setBypassRequestExecutor in interface SipApplicationDispatcherbypassRequestExecutor - the bypassRequestExecutor to setpublic boolean isBypassRequestExecutor()
isBypassRequestExecutor in interface SipApplicationDispatcherpublic void setBypassResponseExecutor(boolean bypassResponseExecutor)
setBypassResponseExecutor in interface SipApplicationDispatcherbypassResponseExecutor - the bypassResponseExecutor to setpublic boolean isBypassResponseExecutor()
isBypassResponseExecutor in interface SipApplicationDispatcherpublic void setBaseTimerInterval(int baseTimerInterval)
setBaseTimerInterval in interface SipApplicationDispatcherbaseTimerInterval - the baseTimerInterval to setpublic int getBaseTimerInterval()
getBaseTimerInterval in interface SipApplicationDispatcherpublic void setT2Interval(int t2Interval)
setT2Interval in interface SipApplicationDispatchert2Interval - the t2Interval to setpublic int getT2Interval()
getT2Interval in interface SipApplicationDispatcherpublic void setT4Interval(int t4Interval)
setT4Interval in interface SipApplicationDispatchert4Interval - the t4Interval to setpublic int getT4Interval()
getT4Interval in interface SipApplicationDispatcherpublic void setTimerDInterval(int timerDInterval)
setTimerDInterval in interface SipApplicationDispatchertimerDInterval - the timerDInterval to setpublic int getTimerDInterval()
getTimerDInterval in interface SipApplicationDispatcherpublic java.lang.String[] getExtensionsSupported()
getExtensionsSupported in interface SipApplicationDispatcherpublic java.lang.String[] getRfcSupported()
getRfcSupported in interface SipApplicationDispatcherpublic void loadBalancerAdded(org.mobicents.ha.javax.sip.SipLoadBalancer sipLoadBalancer)
loadBalancerAdded in interface org.mobicents.ha.javax.sip.LoadBalancerHeartBeatingListenerpublic void loadBalancerRemoved(org.mobicents.ha.javax.sip.SipLoadBalancer sipLoadBalancer)
loadBalancerRemoved in interface org.mobicents.ha.javax.sip.LoadBalancerHeartBeatingListener
public void sendSwitchoverInstruction(java.lang.String fromJvmRoute,
java.lang.String toJvmRoute)
sendSwitchoverInstruction in interface SipApplicationDispatcherinfo - public void setGatherStatistics(boolean skipStatistics)
setGatherStatistics in interface SipApplicationDispatcherskipStatistics - the skipStatistics to setpublic boolean isGatherStatistics()
isGatherStatistics in interface SipApplicationDispatcherpublic boolean getGatherStatistics()
public void setBackToNormalMemoryThreshold(int backToNormalMemoryThreshold)
setBackToNormalMemoryThreshold in interface SipApplicationDispatcherbackToNormalPercentageOfMemoryUsed - the backToNormalPercentageOfMemoryUsed to setpublic int getBackToNormalMemoryThreshold()
getBackToNormalMemoryThreshold in interface SipApplicationDispatcherpublic void setBackToNormalQueueSize(int backToNormalQueueSize)
setBackToNormalQueueSize in interface SipApplicationDispatcherbackToNormalQueueSize - the backToNormalQueueSize to setpublic int getBackToNormalQueueSize()
getBackToNormalQueueSize in interface SipApplicationDispatcherpublic javax.sip.SipStack getSipStack()
getSipStack in interface SipApplicationDispatcherpublic void setSipStack(javax.sip.SipStack sipStack)
setSipStack in interface SipApplicationDispatcher
protected void startSipStack()
throws javax.sip.SipException
javax.sip.SipExceptionprotected void stopSipStack()
public java.lang.String getVersion()
getVersion in interface SipApplicationDispatcher
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||