org.mobicents.servlet.sip.startup
Class SipStandardService

java.lang.Object
  extended by org.apache.catalina.core.StandardService
      extended by org.mobicents.servlet.sip.startup.SipStandardService
All Implemented Interfaces:
javax.management.MBeanRegistration, org.apache.catalina.Lifecycle, org.apache.catalina.Service, SipService
Direct Known Subclasses:
SipStandardBalancerNodeService

public class SipStandardService
extends org.apache.catalina.core.StandardService
implements SipService

Sip Servlet implementation of the SipService interface. This class inherits from the Tomcat StandardService. It adds a SipApplicationDispatcher that will be listen for sip messages received by the sip stacks started by the sip connectors associated with this context. This has one attribute which is the sipApplicationDispatcherClassName allowing one to specify the class name of the sipApplicationDispacther to easily replace the default sipApplicationDispatcher with a custom one.

Author:
Jean Deruelle

Field Summary
protected  java.lang.String concurrencyControlMode
           
protected  long congestionControlCheckingInterval
           
protected  java.lang.String congestionControlPolicy
           
protected  boolean connectorsStartedExternally
           
protected  java.lang.String darConfigurationFileLocation
           
protected  int memoryThreshold
           
protected  SipApplicationDispatcher sipApplicationDispatcher
           
protected  java.lang.String sipApplicationDispatcherClassName
           
protected  int sipMessageQueueSize
           
 
Fields inherited from class org.apache.catalina.core.StandardService
connectors, container, controller, domain, executors, initialized, mserver, oname, suffix, support, type
 
Fields inherited from interface org.apache.catalina.Lifecycle
AFTER_START_EVENT, AFTER_STOP_EVENT, BEFORE_START_EVENT, BEFORE_STOP_EVENT, DESTROY_EVENT, INIT_EVENT, PERIODIC_EVENT, START_EVENT, STOP_EVENT
 
Constructor Summary
SipStandardService()
           
 
Method Summary
 void addConnector(org.apache.catalina.connector.Connector connector)
           
 java.lang.String getConcurrencyControlMode()
          ConcurrencyControl control mode is SipSession, AppSession or None Specifies the isolation level of concurrently executing requests.
 long getCongestionControlCheckingInterval()
           
 java.lang.String getCongestionControlPolicy()
           
 java.lang.String getDarConfigurationFileLocation()
           
 java.lang.String getInfo()
           
 int getMemoryThreshold()
           
 SipApplicationDispatcher getSipApplicationDispatcher()
          Retrieve the sip application dispatcher associated with this service
 java.lang.String getSipApplicationDispatcherClassName()
          Retrieve the sip application dispatcher class name
 int getSipMessageQueueSize()
          Message queue size.
 void initialize()
           
 void removeConnector(org.apache.catalina.connector.Connector connector)
           
 void setConcurrencyControlMode(java.lang.String concurrencyControlMode)
          ConcurrencyControl control mode is SipSession, AppSession or None Specifies the isolation level of concurrently executing requests.
 void setCongestionControlCheckingInterval(long congestionControlCheckingInterval)
           
 void setCongestionControlPolicy(java.lang.String congestionControlPolicy)
           
 void setDarConfigurationFileLocation(java.lang.String darConfigurationFileLocation)
           
 void setMemoryThreshold(int memoryThreshold)
           
 void setSipApplicationDispatcher(SipApplicationDispatcher sipApplicationDispatcher)
          Set the sip application dispatcher associated with this service
 void setSipApplicationDispatcherClassName(java.lang.String sipApplicationDispatcherName)
          Set the sip application dispatcher class name
 void setSipMessageQueueSize(int sipMessageQueueSize)
          Message queue size.
 void start()
           
 void stop()
           
 
Methods inherited from class org.apache.catalina.core.StandardService
addExecutor, addLifecycleListener, addPropertyChangeListener, destroy, findConnectors, findExecutors, findLifecycleListeners, getConnectorNames, getContainer, getContainerName, getDomain, getExecutor, getName, getObjectName, getServer, init, postDeregister, postRegister, preDeregister, preRegister, removeExecutor, removeLifecycleListener, removePropertyChangeListener, setContainer, setName, setServer, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.apache.catalina.Service
addExecutor, findConnectors, findExecutors, getContainer, getExecutor, getName, getServer, removeExecutor, setContainer, setName, setServer
 

Field Detail

sipApplicationDispatcherClassName

protected java.lang.String sipApplicationDispatcherClassName

sipApplicationDispatcher

protected SipApplicationDispatcher sipApplicationDispatcher

sipMessageQueueSize

protected int sipMessageQueueSize

memoryThreshold

protected int memoryThreshold

congestionControlCheckingInterval

protected long congestionControlCheckingInterval

concurrencyControlMode

protected java.lang.String concurrencyControlMode

congestionControlPolicy

protected java.lang.String congestionControlPolicy

darConfigurationFileLocation

protected java.lang.String darConfigurationFileLocation

connectorsStartedExternally

protected boolean connectorsStartedExternally
Constructor Detail

SipStandardService

public SipStandardService()
Method Detail

getInfo

public java.lang.String getInfo()
Specified by:
getInfo in interface org.apache.catalina.Service
Overrides:
getInfo in class org.apache.catalina.core.StandardService

addConnector

public void addConnector(org.apache.catalina.connector.Connector connector)
Specified by:
addConnector in interface org.apache.catalina.Service
Overrides:
addConnector in class org.apache.catalina.core.StandardService

removeConnector

public void removeConnector(org.apache.catalina.connector.Connector connector)
Specified by:
removeConnector in interface org.apache.catalina.Service
Overrides:
removeConnector in class org.apache.catalina.core.StandardService

initialize

public void initialize()
                throws org.apache.catalina.LifecycleException
Specified by:
initialize in interface org.apache.catalina.Service
Overrides:
initialize in class org.apache.catalina.core.StandardService
Throws:
org.apache.catalina.LifecycleException

start

public void start()
           throws org.apache.catalina.LifecycleException
Specified by:
start in interface org.apache.catalina.Lifecycle
Overrides:
start in class org.apache.catalina.core.StandardService
Throws:
org.apache.catalina.LifecycleException

stop

public void stop()
          throws org.apache.catalina.LifecycleException
Specified by:
stop in interface org.apache.catalina.Lifecycle
Overrides:
stop in class org.apache.catalina.core.StandardService
Throws:
org.apache.catalina.LifecycleException

getSipApplicationDispatcherClassName

public java.lang.String getSipApplicationDispatcherClassName()
Retrieve the sip application dispatcher class name

Returns:
the sip application dispatcher class name

setSipApplicationDispatcherClassName

public void setSipApplicationDispatcherClassName(java.lang.String sipApplicationDispatcherName)
Set the sip application dispatcher class name

Parameters:
sipApplicationDispatcherClassName - the sip application dispatcher class name to be set

getSipApplicationDispatcher

public SipApplicationDispatcher getSipApplicationDispatcher()
Description copied from interface: SipService
Retrieve the sip application dispatcher associated with this service

Specified by:
getSipApplicationDispatcher in interface SipService
Returns:
the sipApplicationDispatcher

setSipApplicationDispatcher

public void setSipApplicationDispatcher(SipApplicationDispatcher sipApplicationDispatcher)
Description copied from interface: SipService
Set the sip application dispatcher associated with this service

Specified by:
setSipApplicationDispatcher in interface SipService
Parameters:
sipApplicationDispatcher - the sipApplicationDispatcher to set

getDarConfigurationFileLocation

public java.lang.String getDarConfigurationFileLocation()
Returns:
the darConfigurationFileLocation

setDarConfigurationFileLocation

public void setDarConfigurationFileLocation(java.lang.String darConfigurationFileLocation)
Parameters:
darConfigurationFileLocation - the darConfigurationFileLocation to set

getSipMessageQueueSize

public int getSipMessageQueueSize()
Message queue size. If the number of pending requests exceeds this number they are rejected.

Returns:

setSipMessageQueueSize

public void setSipMessageQueueSize(int sipMessageQueueSize)
Message queue size. If the number of pending requests exceeds this number they are rejected.


getConcurrencyControlMode

public java.lang.String getConcurrencyControlMode()
ConcurrencyControl control mode is SipSession, AppSession or None Specifies the isolation level of concurrently executing requests.

Returns:

setConcurrencyControlMode

public void setConcurrencyControlMode(java.lang.String concurrencyControlMode)
ConcurrencyControl control mode is SipSession, AppSession or None Specifies the isolation level of concurrently executing requests.


setMemoryThreshold

public void setMemoryThreshold(int memoryThreshold)
Parameters:
memoryThreshold - the memoryThreshold to set

getMemoryThreshold

public int getMemoryThreshold()
Returns:
the memoryThreshold

setCongestionControlPolicy

public void setCongestionControlPolicy(java.lang.String congestionControlPolicy)
Parameters:
congestionControlPolicy - the congestionControlPolicy to set

getCongestionControlPolicy

public java.lang.String getCongestionControlPolicy()
Returns:
the congestionControlPolicy

setCongestionControlCheckingInterval

public void setCongestionControlCheckingInterval(long congestionControlCheckingInterval)
Parameters:
congestionControlCheckingInterval - the congestionControlCheckingInterval to set

getCongestionControlCheckingInterval

public long getCongestionControlCheckingInterval()
Returns:
the congestionControlCheckingInterval


Copyright © 2009. All Rights Reserved.