org.mobicents.servlet.sip.core
Interface SipApplicationDispatcher

All Superinterfaces:
java.util.EventListener, javax.sip.SipListener, gov.nist.javax.sip.SipListenerExt
All Known Implementing Classes:
SipApplicationDispatcherImpl

public interface SipApplicationDispatcher
extends gov.nist.javax.sip.SipListenerExt

Classes implementing this interface can be used in the SipService Class to be the central point getting the sip messages from the different stacks and dispatching them to sip applications.


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
 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.lang.String getApplicationNameFromHash(java.lang.String hash)
           
 java.util.concurrent.ExecutorService getAsynchronousExecutor()
           
 int getBackToNormalMemoryThreshold()
           
 int getBackToNormalQueueSize()
           
 int getBaseTimerInterval()
           
 ConcurrencyControlMode getConcurrencyControlMode()
           
 long getCongestionControlCheckingInterval()
           
 CongestionControlPolicy getCongestionControlPolicy()
           
 java.lang.String getDomain()
           
 java.lang.String[] getExtensionsSupported()
           
 java.lang.String getHashFromApplicationName(java.lang.String appName)
           
 int getMemoryThreshold()
           
 SipApplicationRouterInfo getNextInterestedApplication(SipServletRequestImpl sipServletRequestImpl)
           
 int getNumberOfMessagesInQueue()
           
 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()
           
 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()
           
 void init()
          Initialize the sip application dispatcher.
 boolean isBypassRequestExecutor()
           
 boolean isBypassResponseExecutor()
           
 boolean isExternal(java.lang.String host, int port, java.lang.String transport)
           
 boolean isGatherStatistics()
           
 boolean isRouteExternal(javax.sip.header.RouteHeader routeHeader)
           
 boolean isViaHeaderExternal(javax.sip.header.ViaHeader viaHeader)
           
 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
 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 interval)
           
 void setCongestionControlPolicy(CongestionControlPolicy congestionControlPolicy)
           
 void setCongestionControlPolicyByName(java.lang.String congestionControlPolicy)
           
 void setDomain(java.lang.String domain)
           
 void setGatherStatistics(boolean gatherStatistics)
           
 void setMemoryThreshold(int memoryThreshold)
           
 void setQueueSize(int queueSize)
           
 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
 void stop()
          Stop the sip application dispatcher
 
Methods inherited from interface gov.nist.javax.sip.SipListenerExt
processDialogTimeout
 
Methods inherited from interface javax.sip.SipListener
processDialogTerminated, processIOException, processRequest, processResponse, processTimeout, processTransactionTerminated
 

Method Detail

init

void init()
          throws org.apache.catalina.LifecycleException
Initialize the sip application dispatcher.
It will look for the first implementation of an application routerand packaged in accordance with the rules specified by the Java SE Service Provider framework.
It will first look for the javax.servlet.sip.ar.spi.SipApplicationRouterProvider system property since it can be used to override loading behavior. See JSR 289 Section 15.4.2 Application Router Packaging and Deployment for more information

Throws:
org.apache.catalina.LifecycleException - The Sip Application Router cannot be initialized correctly

start

void start()
Start the sip application dispatcher


stop

void stop()
Stop the sip application dispatcher


addSipApplication

void addSipApplication(java.lang.String sipApplicationName,
                       SipContext sipApplication)
Add a new sip application to which sip messages can be routed

Parameters:
sipApplicationName - the sip application logical name
sipApplication - the sip context representing the application

removeSipApplication

SipContext removeSipApplication(java.lang.String sipApplicationName)
Remove a sip application to which sip messages can be routed

Parameters:
sipApplicationName - the sip application logical name of the application to remove

findSipApplications

java.util.Iterator<SipContext> findSipApplications()
Find the sip applications to which sip messages can currently be routed

Returns:
the sip applications to which sip messages can currently be routed

findSipApplication

SipContext findSipApplication(java.lang.String applicationName)
Find the sip application to which sip messages can currently be routed by its name

Parameters:
applicationName - the name of the application
Returns:
the sip application to which sip messages can currently be routed by its name if it has been find, null otherwise

getSipNetworkInterfaceManager

SipNetworkInterfaceManager getSipNetworkInterfaceManager()
Retrieve the manager for the sip network interfaces for this application dispatcher

Returns:
the manager for the sip network interfaces for this application dispatcher

getSipFactory

SipFactoryImpl getSipFactory()
retrieve the sip factory

Returns:
the sip factory

getOutboundInterfaces

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.

Returns:
immutable List containing the SipURI representation of IP addresses

addHostName

void addHostName(java.lang.String hostName)
Add a new hostname to the application dispatcher. This information is used for the routing algorithm of an incoming Request.

Parameters:
hostName - the host name

removeHostName

void removeHostName(java.lang.String hostName)
Remove the hostname from the application dispatcher. This information is used for the routing algorithm of an incoming Request.

Parameters:
hostName - the host name

findHostNames

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

Returns:
An immutable instance of the java.util.List interface containing the sip application dispatcher registered host names

getNextInterestedApplication

SipApplicationRouterInfo getNextInterestedApplication(SipServletRequestImpl sipServletRequestImpl)
Parameters:
sipServletRequestImpl -
Returns:

getDomain

java.lang.String getDomain()

setDomain

void setDomain(java.lang.String domain)

isRouteExternal

boolean isRouteExternal(javax.sip.header.RouteHeader routeHeader)

isViaHeaderExternal

boolean isViaHeaderExternal(javax.sip.header.ViaHeader viaHeader)

isExternal

boolean isExternal(java.lang.String host,
                   int port,
                   java.lang.String transport)

getSipApplicationRouter

SipApplicationRouter getSipApplicationRouter()

sendSwitchoverInstruction

void sendSwitchoverInstruction(java.lang.String fromJvmRoute,
                               java.lang.String toJvmRoute)

getApplicationNameFromHash

java.lang.String getApplicationNameFromHash(java.lang.String hash)

getHashFromApplicationName

java.lang.String getHashFromApplicationName(java.lang.String appName)

getConcurrencyControlMode

ConcurrencyControlMode getConcurrencyControlMode()

setConcurrencyControlMode

void setConcurrencyControlMode(ConcurrencyControlMode concurrencyControlMode)

setConcurrencyControlModeByName

void setConcurrencyControlModeByName(java.lang.String concurrencyControlMode)

getQueueSize

int getQueueSize()

setQueueSize

void setQueueSize(int queueSize)

setMemoryThreshold

void setMemoryThreshold(int memoryThreshold)

getMemoryThreshold

int getMemoryThreshold()

setCongestionControlCheckingInterval

void setCongestionControlCheckingInterval(long interval)

getCongestionControlCheckingInterval

long getCongestionControlCheckingInterval()

getCongestionControlPolicy

CongestionControlPolicy getCongestionControlPolicy()

setCongestionControlPolicy

void setCongestionControlPolicy(CongestionControlPolicy congestionControlPolicy)

setCongestionControlPolicyByName

void setCongestionControlPolicyByName(java.lang.String congestionControlPolicy)

getNumberOfMessagesInQueue

int getNumberOfMessagesInQueue()

getPercentageOfMemoryUsed

double getPercentageOfMemoryUsed()

setBypassRequestExecutor

void setBypassRequestExecutor(boolean bypassRequestExecutor)

isBypassRequestExecutor

boolean isBypassRequestExecutor()

setBypassResponseExecutor

void setBypassResponseExecutor(boolean bypassResponseExecutor)

isBypassResponseExecutor

boolean isBypassResponseExecutor()

setBaseTimerInterval

void setBaseTimerInterval(int baseTimerInterval)

getBaseTimerInterval

int getBaseTimerInterval()

setT2Interval

void setT2Interval(int t2Interval)

getT2Interval

int getT2Interval()

setT4Interval

void setT4Interval(int t4Interval)

getT4Interval

int getT4Interval()

setTimerDInterval

void setTimerDInterval(int timerDInterval)

getTimerDInterval

int getTimerDInterval()

getExtensionsSupported

java.lang.String[] getExtensionsSupported()

getRfcSupported

java.lang.String[] getRfcSupported()

setGatherStatistics

void setGatherStatistics(boolean gatherStatistics)

isGatherStatistics

boolean isGatherStatistics()

setBackToNormalMemoryThreshold

void setBackToNormalMemoryThreshold(int backToNormalMemoryThreshold)

getBackToNormalMemoryThreshold

int getBackToNormalMemoryThreshold()

setBackToNormalQueueSize

void setBackToNormalQueueSize(int backToNormalQueueSize)

getBackToNormalQueueSize

int getBackToNormalQueueSize()

getAsynchronousExecutor

java.util.concurrent.ExecutorService getAsynchronousExecutor()

setSipStack

void setSipStack(javax.sip.SipStack sipStack)

getSipStack

javax.sip.SipStack getSipStack()


Copyright © 2011. All Rights Reserved.