org.mobicents.servlet.sip.core
Interface SipApplicationDispatcher

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

public interface SipApplicationDispatcher
extends javax.sip.SipListener

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.


Field Summary
static java.lang.String[] EXTENSIONS_SUPPORTED
           
static java.lang.String[] RFC_SUPPORTED
           
 
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
 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 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()
           
 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)
           
 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 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 setMemoryThreshold(int memoryThreshold)
           
 void setQueueSize(int queueSize)
           
 void start()
          Start the sip application dispatcher
 void stop()
          Stop the sip application dispatcher
 
Methods inherited from interface javax.sip.SipListener
processDialogTerminated, processIOException, processRequest, processResponse, processTimeout, processTransactionTerminated
 

Field Detail

EXTENSIONS_SUPPORTED

static final java.lang.String[] EXTENSIONS_SUPPORTED

RFC_SUPPORTED

static final java.lang.String[] RFC_SUPPORTED
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()

getMdToApplicationName

java.util.Map<java.lang.String,java.lang.String> getMdToApplicationName()

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()


Copyright © 2009. All Rights Reserved.