org.mobicents.servlet.sip.startup
Class SipStandardContext

java.lang.Object
  extended by org.apache.catalina.core.ContainerBase
      extended by org.apache.catalina.core.StandardContext
          extended by org.mobicents.servlet.sip.startup.SipStandardContext
All Implemented Interfaces:
java.io.Serializable, javax.management.MBeanRegistration, javax.management.NotificationBroadcaster, javax.management.NotificationEmitter, org.apache.catalina.Container, org.apache.catalina.Context, org.apache.catalina.Lifecycle, org.apache.catalina.Pipeline, SipContext

public class SipStandardContext
extends org.apache.catalina.core.StandardContext
implements SipContext

Sip implementation of the Context interface extending the standard tomcat context to allow deployment of converged applications (sip & web apps) as well as standalone sip servlets applications.

Author:
Jean Deruelle
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.catalina.core.ContainerBase
org.apache.catalina.core.ContainerBase.ContainerBackgroundProcessor, org.apache.catalina.core.ContainerBase.PrivilegedAddChild
 
Field Summary
protected  java.lang.String applicationName
           
protected  java.util.Map<java.lang.String,org.apache.catalina.Container> childrenMap
           
protected  java.lang.String description
           
protected  java.lang.String largeIcon
           
protected  SipListenersHolder listeners
           
protected  java.lang.String mainServlet
           
protected  java.lang.String namingContextName
           
protected  int proxyTimeout
           
protected  SipApplicationDispatcher sipApplicationDispatcher
           
protected  java.lang.reflect.Method sipApplicationKeyMethod
           
protected  java.util.List<java.lang.String> sipApplicationListeners
          The set of sip application listener class names configured for this application, in the order they were encountered in the sip.xml file.
protected  int sipApplicationSessionTimeout
           
protected  SipFactoryFacade sipFactoryFacade
           
protected  SipLoginConfig sipLoginConfig
           
protected  java.util.List<SipServletMapping> sipServletMappings
          The set of sip servlet mapping configured for this application.
protected  SipSessionsUtilImpl sipSessionsUtil
           
protected  java.lang.String smallIcon
           
 
Fields inherited from class org.apache.catalina.core.StandardContext
allowLinking, cacheMaxSize, cacheTTL, caseSensitive, context, urlEncoder
 
Fields inherited from class org.apache.catalina.core.ContainerBase
backgroundProcessorDelay, children, cluster, controller, domain, initialized, lifecycle, loader, logName, manager, mserver, name, oname, parent, parentClassLoader, pipeline, realm, resources, sm, startChildren, started, suffix, support, type
 
Fields inherited from interface org.mobicents.servlet.sip.startup.SipContext
APPLICATION_SIP_XML
 
Fields inherited from interface org.apache.catalina.Context
RELOAD_EVENT
 
Fields inherited from interface org.apache.catalina.Container
ADD_CHILD_EVENT, ADD_MAPPER_EVENT, ADD_VALVE_EVENT, REMOVE_CHILD_EVENT, REMOVE_MAPPER_EVENT, REMOVE_VALVE_EVENT
 
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
SipStandardContext()
           
 
Method Summary
 void addChild(SipServletImpl sipServletImpl)
           
 void addConstraint(SipSecurityConstraint securityConstraint)
           
 void addSipApplicationListener(java.lang.String listener)
          Add a new Listener class name to the set of Listeners configured for this application.
 void addSipServletMapping(SipServletMapping sipServletMapping)
          
 org.apache.catalina.Wrapper createWrapper()
           
 java.lang.String[] findSipApplicationListeners()
          Return the set of sip application listener class names configured for this application.
 java.util.List<SipServletMapping> findSipServletMappings()
          
 SipServletMapping findSipServletMappings(SipServletRequest sipServletRequest)
          
 java.lang.String getApplicationName()
           
protected  java.lang.String getBasePath()
          Get base path.
 java.util.Map<java.lang.String,org.apache.catalina.Container> getChildrenMap()
          
 java.lang.String getDescription()
           
 java.lang.String getInfo()
           
 java.lang.String getJbossBasePath()
           
 java.lang.String getLargeIcon()
           
 SipListenersHolder getListeners()
           
 org.apache.catalina.deploy.LoginConfig getLoginConfig()
           
 java.lang.String getMainServlet()
           
 org.apache.catalina.Manager getManager()
           
 int getProxyTimeout()
           
 javax.servlet.ServletContext getServletContext()
           
 SipApplicationDispatcher getSipApplicationDispatcher()
           
 java.lang.reflect.Method getSipApplicationKeyMethod()
           
 int getSipApplicationSessionTimeout()
           
 SipFactoryFacade getSipFactoryFacade()
           
 SipLoginConfig getSipLoginConfig()
           
 SipManager getSipManager()
          
 SipSessionsUtil getSipSessionsUtil()
           
 java.lang.String getSmallIcon()
           
 TimerService getTimerService()
           
 void init()
           
 boolean listenerStart()
           
 boolean listenerStop()
           
 void loadOnStartup(org.apache.catalina.Container[] containers)
           
 void removeChild(SipServletImpl sipServletImpl)
           
 void removeConstraint(SipSecurityConstraint securityConstraint)
           
 void removeSipApplicationListener(java.lang.String listener)
          Remove the specified application listener class from the set of listeners for this application.
 void removeSipServletMapping(SipServletMapping sipServletMapping)
          
protected  void setApplicationDispatcher()
           
 void setApplicationName(java.lang.String applicationName)
           
 void setDescription(java.lang.String description)
           
 void setLargeIcon(java.lang.String largeIcon)
           
 void setListeners(SipListenersHolder listeners)
           
 void setLoginConfig(org.apache.catalina.deploy.LoginConfig config)
           
 void setMainServlet(java.lang.String mainServlet)
           
 void setManager(org.apache.catalina.Manager manager)
           
 void setProxyTimeout(int proxyTimeout)
           
 void setSipApplicationKeyMethod(java.lang.reflect.Method sipApplicationKeyMethod)
           
 void setSipApplicationSessionTimeout(int sipApplicationSessionTimeout)
           
 void setSipLoginConfig(SipLoginConfig config)
           
 void setSmallIcon(java.lang.String smallIcon)
           
 void start()
           
 void stop()
           
 
Methods inherited from class org.apache.catalina.core.StandardContext
addApplicationListener, addApplicationParameter, addChild, addConstraint, addErrorPage, addFilterDef, addFilterMap, addInstanceListener, addJspMapping, addLocaleEncodingMappingParameter, addMessageDestination, addMessageDestinationRef, addMimeMapping, addNotificationListener, addParameter, addRoleMapping, addSecurityRole, addServletMapping, addServletMapping, addTaglib, addWatchedResource, addWelcomeFile, addWrapperLifecycle, addWrapperListener, adjustURLPattern, create, createObjectName, destroy, engineBase, filterStart, filterStop, findApplicationListeners, findApplicationParameters, findConstraints, findErrorPage, findErrorPage, findErrorPages, findFilterConfig, findFilterDef, findFilterDefs, findFilterMaps, findInstanceListeners, findMappingObject, findMessageDestination, findMessageDestinationRef, findMessageDestinationRefs, findMessageDestinations, findMimeMapping, findMimeMappings, findParameter, findParameters, findRoleMapping, findSecurityRole, findSecurityRoles, findServletMapping, findServletMappings, findStaticResources, findStatusPage, findStatusPages, findTaglib, findTaglibs, findWatchedResources, findWelcomeFile, findWelcomeFiles, findWrapperLifecycles, findWrapperListeners, getAltDDName, getAnnotationProcessor, getAntiJARLocking, getAntiResourceLocking, getAppBase, getApplicationEventListeners, getApplicationLifecycleListeners, getAvailable, getCacheMaxSize, getCacheTTL, getCharsetMapper, getCharsetMapperClass, getCompilerClasspath, getConfigBase, getConfigFile, getConfigured, getCookies, getCrossContext, getDefaultConfigFile, getDefaultContextXml, getDefaultWebXml, getDelegate, getDeploymentDescriptor, getDisplayName, getDistributable, getDocBase, getEncodedPath, getEngineName, getHostname, getIgnoreAnnotations, getJ2EEApplication, getJ2EEServer, getJavaVMs, getMapper, getNamingContextListener, getNamingResources, getNotificationInfo, getOriginalDocBase, getOverride, getParentClassLoader, getParentName, getPath, getPaused, getPrivileged, getProcessingTime, getProcessTlds, getPublicId, getReloadable, getServer, getServlets, getSessionTimeout, getStartTime, getStartupTime, getState, getStaticResources, getSwallowOutput, getTldNamespaceAware, getTldScanTime, getTldValidation, getUnloadDelay, getUnpackWAR, getWelcomeFiles, getWorkDir, getWorkPath, getWrapperClass, getXmlNamespaceAware, getXmlValidation, isAllowLinking, isCachingAllowed, isCaseSensitive, isEventProvider, isFilesystemBased, isLazy, isReplaceWelcomeFiles, isSaveConfig, isServlet22, isStateManageable, isStatisticsProvider, isUseNaming, preDeregister, preRegister, processTlds, reload, removeApplicationListener, removeApplicationParameter, removeChild, removeConstraint, removeErrorPage, removeFilterDef, removeFilterMap, removeInstanceListener, removeMessageDestination, removeMessageDestinationRef, removeMimeMapping, removeNotificationListener, removeNotificationListener, removeParameter, removeRoleMapping, removeSecurityRole, removeServletMapping, removeTaglib, removeWatchedResource, removeWelcomeFile, removeWrapperLifecycle, removeWrapperListener, resourcesStart, resourcesStop, setAllowLinking, setAltDDName, setAnnotationProcessor, setAntiJARLocking, setAntiResourceLocking, setApplicationEventListeners, setApplicationLifecycleListeners, setAvailable, setCacheMaxSize, setCacheTTL, setCachingAllowed, setCaseSensitive, setCharsetMapper, setCharsetMapperClass, setCompilerClasspath, setConfigFile, setConfigured, setCookies, setCrossContext, setDefaultContextXml, setDefaultWebXml, setDelegate, setDisplayName, setDistributable, setDocBase, setEngineName, setIgnoreAnnotations, setJ2EEApplication, setJ2EEServer, setJavaVMs, setLazy, setLoader, setName, setNamingContextListener, setNamingResources, setOriginalDocBase, setOverride, setPath, setPrivileged, setProcessTlds, setPublicId, setReloadable, setReplaceWelcomeFiles, setResources, setSaveConfig, setServer, setSessionTimeout, setStartupTime, setSwallowOutput, setTldNamespaceAware, setTldScanTime, setTldValidation, setUnloadDelay, setUnpackWAR, setUseNaming, setWorkDir, setWrapperClass, setXmlNamespaceAware, setXmlValidation, startRecursive, toString
 
Methods inherited from class org.apache.catalina.core.ContainerBase
addContainerListener, addLifecycleListener, addPropertyChangeListener, addValve, backgroundProcess, findChild, findChildren, findContainerListeners, findLifecycleListeners, fireContainerEvent, getBackgroundProcessorDelay, getBasic, getChildren, getCluster, getContainerSuffix, getDomain, getFirst, getJmxName, getJSR77Suffix, getLoader, getLogger, getMappingObject, getName, getObjectName, getParent, getPipeline, getRealm, getResources, getStartChildren, getType, getValveObjectNames, getValves, invoke, logName, postDeregister, postRegister, removeContainerListener, removeLifecycleListener, removePropertyChangeListener, removeValve, setBackgroundProcessorDelay, setBasic, setCluster, setDomain, setParent, setParentClassLoader, setRealm, setStartChildren, threadStart, threadStop
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.mobicents.servlet.sip.startup.SipContext
addConstraint, removeConstraint
 
Methods inherited from interface org.apache.catalina.Context
addApplicationListener, addApplicationParameter, addErrorPage, addFilterDef, addFilterMap, addInstanceListener, addJspMapping, addLocaleEncodingMappingParameter, addMimeMapping, addParameter, addRoleMapping, addSecurityRole, addServletMapping, addTaglib, addWatchedResource, addWelcomeFile, addWrapperLifecycle, addWrapperListener, findApplicationListeners, findApplicationParameters, findConstraints, findErrorPage, findErrorPage, findErrorPages, findFilterDef, findFilterDefs, findFilterMaps, findInstanceListeners, findMimeMapping, findMimeMappings, findParameter, findParameters, findRoleMapping, findSecurityRole, findSecurityRoles, findServletMapping, findServletMappings, findStatusPage, findStatusPages, findTaglib, findTaglibs, findWatchedResources, findWelcomeFile, findWelcomeFiles, findWrapperLifecycles, findWrapperListeners, getAltDDName, getApplicationEventListeners, getApplicationLifecycleListeners, getAvailable, getCharsetMapper, getConfigFile, getConfigured, getCookies, getCrossContext, getDisplayName, getDistributable, getDocBase, getEncodedPath, getIgnoreAnnotations, getMapper, getNamingResources, getOverride, getPath, getPrivileged, getPublicId, getReloadable, getSessionTimeout, getSwallowOutput, getTldNamespaceAware, getTldValidation, getWrapperClass, getXmlNamespaceAware, getXmlValidation, reload, removeApplicationListener, removeApplicationParameter, removeErrorPage, removeFilterDef, removeFilterMap, removeInstanceListener, removeMimeMapping, removeParameter, removeRoleMapping, removeSecurityRole, removeServletMapping, removeTaglib, removeWatchedResource, removeWelcomeFile, removeWrapperLifecycle, removeWrapperListener, setAltDDName, setApplicationEventListeners, setApplicationLifecycleListeners, setAvailable, setCharsetMapper, setConfigFile, setConfigured, setCookies, setCrossContext, setDisplayName, setDistributable, setDocBase, setIgnoreAnnotations, setNamingResources, setOverride, setPath, setPrivileged, setPublicId, setReloadable, setSessionTimeout, setSwallowOutput, setTldNamespaceAware, setTldValidation, setWrapperClass, setXmlNamespaceAware, setXmlValidation
 
Methods inherited from interface org.apache.catalina.Container
addChild, addContainerListener, addPropertyChangeListener, backgroundProcess, findChild, findChildren, findContainerListeners, getBackgroundProcessorDelay, getCluster, getLoader, getLogger, getMappingObject, getName, getObjectName, getParent, getParentClassLoader, getPipeline, getRealm, getResources, invoke, removeChild, removeContainerListener, removePropertyChangeListener, setBackgroundProcessorDelay, setCluster, setLoader, setName, setParent, setParentClassLoader, setRealm, setResources
 

Field Detail

applicationName

protected java.lang.String applicationName

smallIcon

protected java.lang.String smallIcon

largeIcon

protected java.lang.String largeIcon

description

protected java.lang.String description

proxyTimeout

protected int proxyTimeout

sipApplicationSessionTimeout

protected int sipApplicationSessionTimeout

listeners

protected SipListenersHolder listeners

mainServlet

protected java.lang.String mainServlet

sipFactoryFacade

protected SipFactoryFacade sipFactoryFacade

sipSessionsUtil

protected SipSessionsUtilImpl sipSessionsUtil

sipLoginConfig

protected SipLoginConfig sipLoginConfig

namingContextName

protected java.lang.String namingContextName

sipApplicationKeyMethod

protected java.lang.reflect.Method sipApplicationKeyMethod

sipApplicationListeners

protected java.util.List<java.lang.String> sipApplicationListeners
The set of sip application listener class names configured for this application, in the order they were encountered in the sip.xml file.


sipServletMappings

protected java.util.List<SipServletMapping> sipServletMappings
The set of sip servlet mapping configured for this application.


sipApplicationDispatcher

protected SipApplicationDispatcher sipApplicationDispatcher

childrenMap

protected java.util.Map<java.lang.String,org.apache.catalina.Container> childrenMap
Constructor Detail

SipStandardContext

public SipStandardContext()
Method Detail

init

public void init()
          throws java.lang.Exception
Overrides:
init in class org.apache.catalina.core.StandardContext
Throws:
java.lang.Exception

setApplicationDispatcher

protected void setApplicationDispatcher()
                                 throws org.apache.catalina.LifecycleException
Throws:
java.lang.Exception
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.StandardContext
Throws:
org.apache.catalina.LifecycleException

getServletContext

public javax.servlet.ServletContext getServletContext()
Specified by:
getServletContext in interface org.apache.catalina.Context
Overrides:
getServletContext in class org.apache.catalina.core.StandardContext

listenerStart

public boolean listenerStart()
Overrides:
listenerStart in class org.apache.catalina.core.StandardContext

listenerStop

public boolean listenerStop()
Overrides:
listenerStop in class org.apache.catalina.core.StandardContext

getBasePath

protected java.lang.String getBasePath()
Get base path. Copy pasted from StandardContext Tomcat class

Overrides:
getBasePath in class org.apache.catalina.core.StandardContext

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.StandardContext
Throws:
org.apache.catalina.LifecycleException

loadOnStartup

public void loadOnStartup(org.apache.catalina.Container[] containers)
Overrides:
loadOnStartup in class org.apache.catalina.core.StandardContext

createWrapper

public org.apache.catalina.Wrapper createWrapper()
Specified by:
createWrapper in interface org.apache.catalina.Context
Overrides:
createWrapper in class org.apache.catalina.core.StandardContext

addChild

public void addChild(SipServletImpl sipServletImpl)
Specified by:
addChild in interface SipContext

removeChild

public void removeChild(SipServletImpl sipServletImpl)
Specified by:
removeChild in interface SipContext

getChildrenMap

public java.util.Map<java.lang.String,org.apache.catalina.Container> getChildrenMap()

Specified by:
getChildrenMap in interface SipContext

getApplicationName

public java.lang.String getApplicationName()
Specified by:
getApplicationName in interface SipContext

setApplicationName

public void setApplicationName(java.lang.String applicationName)
Specified by:
setApplicationName in interface SipContext

getDescription

public java.lang.String getDescription()
Specified by:
getDescription in interface SipContext

setDescription

public void setDescription(java.lang.String description)
Specified by:
setDescription in interface SipContext

getLargeIcon

public java.lang.String getLargeIcon()
Specified by:
getLargeIcon in interface SipContext

setLargeIcon

public void setLargeIcon(java.lang.String largeIcon)
Specified by:
setLargeIcon in interface SipContext

getListeners

public SipListenersHolder getListeners()
Specified by:
getListeners in interface SipContext

setListeners

public void setListeners(SipListenersHolder listeners)
Specified by:
setListeners in interface SipContext

getMainServlet

public java.lang.String getMainServlet()
Specified by:
getMainServlet in interface SipContext

setMainServlet

public void setMainServlet(java.lang.String mainServlet)
Specified by:
setMainServlet in interface SipContext

getProxyTimeout

public int getProxyTimeout()
Specified by:
getProxyTimeout in interface SipContext

setProxyTimeout

public void setProxyTimeout(int proxyTimeout)
Specified by:
setProxyTimeout in interface SipContext

addConstraint

public void addConstraint(SipSecurityConstraint securityConstraint)

removeConstraint

public void removeConstraint(SipSecurityConstraint securityConstraint)

getSmallIcon

public java.lang.String getSmallIcon()
Specified by:
getSmallIcon in interface SipContext

setSmallIcon

public void setSmallIcon(java.lang.String smallIcon)
Specified by:
setSmallIcon in interface SipContext

setLoginConfig

public void setLoginConfig(org.apache.catalina.deploy.LoginConfig config)
Specified by:
setLoginConfig in interface org.apache.catalina.Context
Overrides:
setLoginConfig in class org.apache.catalina.core.StandardContext

getLoginConfig

public org.apache.catalina.deploy.LoginConfig getLoginConfig()
Specified by:
getLoginConfig in interface org.apache.catalina.Context
Overrides:
getLoginConfig in class org.apache.catalina.core.StandardContext

setSipLoginConfig

public void setSipLoginConfig(SipLoginConfig config)
Specified by:
setSipLoginConfig in interface SipContext

getSipLoginConfig

public SipLoginConfig getSipLoginConfig()
Specified by:
getSipLoginConfig in interface SipContext

addSipApplicationListener

public void addSipApplicationListener(java.lang.String listener)
Add a new Listener class name to the set of Listeners configured for this application.

Specified by:
addSipApplicationListener in interface SipContext
Parameters:
listener - Java class name of a listener class

removeSipApplicationListener

public void removeSipApplicationListener(java.lang.String listener)
Remove the specified application listener class from the set of listeners for this application.

Specified by:
removeSipApplicationListener in interface SipContext
Parameters:
listener - Java class name of the listener to be removed

findSipApplicationListeners

public java.lang.String[] findSipApplicationListeners()
Return the set of sip application listener class names configured for this application.

Specified by:
findSipApplicationListeners in interface SipContext

getSipApplicationDispatcher

public SipApplicationDispatcher getSipApplicationDispatcher()
Specified by:
getSipApplicationDispatcher in interface SipContext
Returns:
the sipApplicationDispatcher

getSipFactoryFacade

public SipFactoryFacade getSipFactoryFacade()
Returns:
the sipFactoryFacade

getSipSessionsUtil

public SipSessionsUtil getSipSessionsUtil()
Returns:
the sipSessionsUtil

getTimerService

public TimerService getTimerService()
Returns:
the timerService

setManager

public void setManager(org.apache.catalina.Manager manager)
Specified by:
setManager in interface org.apache.catalina.Container
Overrides:
setManager in class org.apache.catalina.core.ContainerBase

getManager

public org.apache.catalina.Manager getManager()
Specified by:
getManager in interface org.apache.catalina.Container
Overrides:
getManager in class org.apache.catalina.core.ContainerBase

getSipApplicationSessionTimeout

public int getSipApplicationSessionTimeout()
Specified by:
getSipApplicationSessionTimeout in interface SipContext
Returns:
the sipApplicationSessionTimeout in minutes

setSipApplicationSessionTimeout

public void setSipApplicationSessionTimeout(int sipApplicationSessionTimeout)
Specified by:
setSipApplicationSessionTimeout in interface SipContext
Parameters:
sipApplicationSessionTimeout - the sipApplicationSessionTimeout to set in minutes

getSipApplicationKeyMethod

public java.lang.reflect.Method getSipApplicationKeyMethod()
Specified by:
getSipApplicationKeyMethod in interface SipContext

setSipApplicationKeyMethod

public void setSipApplicationKeyMethod(java.lang.reflect.Method sipApplicationKeyMethod)
Specified by:
setSipApplicationKeyMethod in interface SipContext

getJbossBasePath

public java.lang.String getJbossBasePath()

addSipServletMapping

public void addSipServletMapping(SipServletMapping sipServletMapping)

Specified by:
addSipServletMapping in interface SipContext

findSipServletMappings

public java.util.List<SipServletMapping> findSipServletMappings()

Specified by:
findSipServletMappings in interface SipContext

findSipServletMappings

public SipServletMapping findSipServletMappings(SipServletRequest sipServletRequest)

Specified by:
findSipServletMappings in interface SipContext

removeSipServletMapping

public void removeSipServletMapping(SipServletMapping sipServletMapping)

Specified by:
removeSipServletMapping in interface SipContext

getSipManager

public SipManager getSipManager()

Specified by:
getSipManager in interface SipContext

getInfo

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


Copyright © 2008. All Rights Reserved.