org.mobicents.servlet.sip.startup.jboss
Class JBossSip

java.lang.Object
  extended by org.jboss.mx.util.JBossNotificationBroadcasterSupport
      extended by org.jboss.system.ServiceMBeanSupport
          extended by org.jboss.deployment.SubDeployerSupport
              extended by org.jboss.web.AbstractWebContainer
                  extended by org.mobicents.servlet.sip.startup.jboss.AbstractConvergedContainer
                      extended by org.mobicents.servlet.sip.startup.jboss.JBossSip
All Implemented Interfaces:
java.util.EventListener, javax.management.MBeanRegistration, javax.management.NotificationBroadcaster, javax.management.NotificationEmitter, javax.management.NotificationListener, org.jboss.deployment.SubDeployer, org.jboss.deployment.SubDeployerExt, org.jboss.deployment.SubDeployerExtMBean, org.jboss.deployment.SubDeployerMBean, org.jboss.system.Service, org.jboss.system.ServiceMBean, org.jboss.web.AbstractWebContainerMBean, org.jboss.web.tomcat.service.JBossWebMBean

public class JBossSip
extends AbstractConvergedContainer
implements org.jboss.web.tomcat.service.JBossWebMBean, javax.management.NotificationListener

An implementation of the AbstractConvergedContainer for the Jakarta Tomcat5 servlet container. It has no code dependency on tomcat - only the new JMX model is used.

Tomcat5 is organized as a set of mbeans - just like jboss.

Version:
$Revision: 57206 $
Author:
Scott.Stark@jboss.org, Costin Manolache, Wonne.Keysers@realsoftware.be, Dimitris.Andreadis@jboss.org, Anil.Saldhana@jboss.org
See Also:
AbstractWebContainer

Nested Class Summary
 
Nested classes/interfaces inherited from class org.jboss.web.AbstractWebContainer
org.jboss.web.AbstractWebContainer.WebDescriptorParser
 
Nested classes/interfaces inherited from class org.jboss.deployment.SubDeployerSupport
org.jboss.deployment.SubDeployerSupport.ClassConfiguration
 
Field Summary
static java.lang.String DEFAULT_CACHE_NAME
          Default value for property cacheName.
protected  java.lang.String managerClass
          The fully qualified name of the class that will be used for session management if distributable is set to true.
static java.lang.String NAME
           
static java.lang.String SAR_SUFFIX
          Code added by jean.deruelle regarding the original jboss file
 
Fields inherited from class org.jboss.web.AbstractWebContainer
acceptNonWarDirs, defaultSecurityDomain, DEPLOYER, deploymentMap, ERROR, java2ClassLoadingCompliance, lenientEjbLink, serviceController, unpackWars, WEB_APP, WEB_MODULE
 
Fields inherited from class org.jboss.deployment.SubDeployerSupport
CONFIGURATION, enhancedSuffixes, mainDeployer, nativePrefix, nativeSuffix, relativeOrder, suffixes, tempDeployDir
 
Fields inherited from class org.jboss.system.ServiceMBeanSupport
log, server, SERVICE_CONTROLLER_SIG, serviceName
 
Fields inherited from interface org.jboss.web.tomcat.service.JBossWebMBean
TOMCAT_CONNECTORS_STARTED
 
Fields inherited from interface org.jboss.system.ServiceMBean
CREATE_EVENT, CREATED, DESTROY_EVENT, DESTROYED, FAILED, REGISTERED, START_EVENT, STARTED, STARTING, states, STOP_EVENT, STOPPED, STOPPING, UNREGISTERED
 
Fields inherited from interface org.jboss.deployment.SubDeployer
CREATE_NOTIFICATION, DESTROY_NOTIFICATION, INIT_NOTIFICATION, RELATIVE_ORDER_100, RELATIVE_ORDER_200, RELATIVE_ORDER_300, RELATIVE_ORDER_400, RELATIVE_ORDER_500, RELATIVE_ORDER_600, RELATIVE_ORDER_700, RELATIVE_ORDER_800, RELATIVE_ORDER_900, START_NOTIFICATION, STOP_NOTIFICATION
 
Constructor Summary
JBossSip()
           
 
Method Summary
 boolean accepts(org.jboss.deployment.DeploymentInfo sdi)
           
 java.util.Properties getAuthenticators()
           
 java.lang.String getCacheName()
          Gets the JMX object name of a shared TreeCache to be used for clustered single-sign-on.
 java.lang.String getConfigFile()
           
 java.lang.String getContextMBeanCode()
           
 boolean getDeleteWorkDirOnContextDestroy()
           
 org.jboss.web.AbstractWebDeployer getDeployer(org.jboss.deployment.DeploymentInfo di)
           
 java.lang.String getDomain()
           
 java.lang.String[] getFilteredPackages()
           
 java.lang.String getHttpHeaderForSSOAuth()
           
 java.lang.String getManagerClass()
           
 java.lang.String getName()
           
 java.lang.String getSessionCookieForSSOAuth()
           
 java.lang.String getSessionIdAlphabet()
          The SessionIdAlphabet is the set of characters used to create a session Id
 int getSnapshotInterval()
          Get the snapshot interval
 java.lang.String getSnapshotMode()
          Get the snapshot mode
 java.lang.String getSubjectAttributeName()
           
 boolean getUseJBossWebLoader()
           
 void handleNotification(javax.management.Notification msg, java.lang.Object handback)
           
 boolean isAllowSelfPrivilegedWebApps()
           
static boolean isSipServletApplication(org.jboss.deployment.DeploymentInfo di)
          Check if the WEB-INF/sip.xml file can be found in the local class loader of the service deployment info.
 boolean isUseJK()
           
 boolean isUseLocalCache()
           
 void setAllowSelfPrivilegedWebApps(boolean allowSelfPrivilegedWebApps)
           
 void setAuthenticators(java.util.Properties prop)
           
 void setCacheName(java.lang.String cacheName)
          Gets the JMX object name of a shared TreeCache to be used for clustered single-sign-on.
 void setConfigFile(java.lang.String configFile)
           
 void setContextMBeanCode(java.lang.String className)
           
 void setDeleteWorkDirOnContextDestroy(boolean deleteFlag)
           
 void setDomain(java.lang.String catalinaDomain)
          The most important atteribute - defines the managed domain.
 void setFilteredPackages(java.lang.String[] pkgs)
           
 void setHttpHeaderForSSOAuth(java.lang.String httpHeader)
           
 void setManagerClass(java.lang.String managerClass)
           
 void setSecurityManagerService(org.jboss.security.plugins.JaasSecurityManagerServiceMBean mgr)
           
 void setSessionCookieForSSOAuth(java.lang.String sessionC)
           
 void setSessionIdAlphabet(java.lang.String sessionIdAlphabet)
          The SessionIdAlphabet is the set of characters used to create a session Id
 void setSnapshotInterval(int interval)
          Set the snapshot interval in milliseconds for snapshot mode = interval
 void setSnapshotMode(java.lang.String mode)
          Set the snapshot mode.
 void setSubjectAttributeName(java.lang.String name)
           
 void setUseJBossWebLoader(boolean flag)
           
 void setUseJK(boolean useJK)
           
 void setUseLocalCache(boolean useLocalCache)
           
 void startConnectors()
           
 void startService()
           
 void stopConnectors()
           
 void stopService()
           
 
Methods inherited from class org.mobicents.servlet.sip.startup.jboss.AbstractConvergedContainer
init, parseMetaData
 
Methods inherited from class org.jboss.web.AbstractWebContainer
addDeployedApp, create, destroy, getAcceptNonWarDirs, getClassLoaderURLs, getCompileClasspath, getConfig, getDefaultSecurityDomain, getDeployedApp, getDeployedApplications, getJava2ClassLoadingCompliance, getLenientEjbLink, getUnpackWars, isDeployed, processNestedDeployments, removeDeployedApp, setAcceptNonWarDirs, setConfig, setDefaultSecurityDomain, setJava2ClassLoadingCompliance, setLenientEjbLink, setUnpackWars, start, stop
 
Methods inherited from class org.jboss.deployment.SubDeployerSupport
addDeployableFiles, addDeployableJar, createService, deployUrl, destroyService, emitNotification, getEnhancedSuffixes, getRelativeOrder, getSuffixes, isDeployable, setEnhancedSuffixes, setRelativeOrder, setSuffixes
 
Methods inherited from class org.jboss.system.ServiceMBeanSupport
create, destroy, getDeploymentInfo, getLog, getNextNotificationSequenceNumber, getObjectName, getServer, getServiceName, getState, getStateString, jbossInternalCreate, jbossInternalDescription, jbossInternalDestroy, jbossInternalLifecycle, jbossInternalStart, jbossInternalStop, postDeregister, postRegister, preDeregister, preRegister, start, stop
 
Methods inherited from class org.jboss.mx.util.JBossNotificationBroadcasterSupport
addNotificationListener, getNotificationInfo, handleNotification, nextNotificationSequenceNumber, removeNotificationListener, removeNotificationListener, sendNotification
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jboss.web.AbstractWebContainerMBean
getAcceptNonWarDirs, getConfig, getDefaultSecurityDomain, getDeployedApplications, getJava2ClassLoadingCompliance, getLenientEjbLink, getUnpackWars, isDeployed, setAcceptNonWarDirs, setConfig, setDefaultSecurityDomain, setJava2ClassLoadingCompliance, setLenientEjbLink, setUnpackWars
 
Methods inherited from interface org.jboss.deployment.SubDeployerExtMBean
getEnhancedSuffixes, setEnhancedSuffixes
 
Methods inherited from interface org.jboss.deployment.SubDeployerMBean
create, destroy, getRelativeOrder, getServiceName, getSuffixes, init, start, stop
 
Methods inherited from interface org.jboss.system.ServiceMBean
getState, getStateString, jbossInternalLifecycle
 
Methods inherited from interface org.jboss.system.Service
create, destroy, start, stop
 
Methods inherited from interface org.jboss.deployment.SubDeployer
getServiceName
 

Field Detail

NAME

public static final java.lang.String NAME
See Also:
Constant Field Values

DEFAULT_CACHE_NAME

public static final java.lang.String DEFAULT_CACHE_NAME
Default value for property cacheName. This name will be used by JBossCache exclusively for Tomcat clustering, e.g., session and sso replication.

See Also:
Constant Field Values

managerClass

protected java.lang.String managerClass
The fully qualified name of the class that will be used for session management if distributable is set to true.


SAR_SUFFIX

public static final java.lang.String SAR_SUFFIX
Code added by jean.deruelle regarding the original jboss file

See Also:
Constant Field Values
Constructor Detail

JBossSip

public JBossSip()
Method Detail

getName

public java.lang.String getName()
Specified by:
getName in interface org.jboss.system.ServiceMBean
Overrides:
getName in class org.jboss.system.ServiceMBeanSupport

getManagerClass

public java.lang.String getManagerClass()
Specified by:
getManagerClass in interface org.jboss.web.tomcat.service.JBossWebMBean

setManagerClass

public void setManagerClass(java.lang.String managerClass)
Specified by:
setManagerClass in interface org.jboss.web.tomcat.service.JBossWebMBean

getDomain

public java.lang.String getDomain()
Specified by:
getDomain in interface org.jboss.web.tomcat.service.JBossWebMBean

getAuthenticators

public java.util.Properties getAuthenticators()

setAuthenticators

public void setAuthenticators(java.util.Properties prop)

setDomain

public void setDomain(java.lang.String catalinaDomain)
The most important atteribute - defines the managed domain. A catalina instance (engine) corresponds to a JMX domain, that's how we know where to deploy webapps.

Specified by:
setDomain in interface org.jboss.web.tomcat.service.JBossWebMBean
Parameters:
catalinaDomain - the domain portion of the JMX ObjectNames

setContextMBeanCode

public void setContextMBeanCode(java.lang.String className)
Specified by:
setContextMBeanCode in interface org.jboss.web.tomcat.service.JBossWebMBean

getContextMBeanCode

public java.lang.String getContextMBeanCode()
Specified by:
getContextMBeanCode in interface org.jboss.web.tomcat.service.JBossWebMBean

setSnapshotInterval

public void setSnapshotInterval(int interval)
Set the snapshot interval in milliseconds for snapshot mode = interval

Specified by:
setSnapshotInterval in interface org.jboss.web.tomcat.service.JBossWebMBean

getSnapshotInterval

public int getSnapshotInterval()
Get the snapshot interval

Specified by:
getSnapshotInterval in interface org.jboss.web.tomcat.service.JBossWebMBean

setSnapshotMode

public void setSnapshotMode(java.lang.String mode)
Set the snapshot mode. Currently supported: instant or interval

Specified by:
setSnapshotMode in interface org.jboss.web.tomcat.service.JBossWebMBean

getSnapshotMode

public java.lang.String getSnapshotMode()
Get the snapshot mode

Specified by:
getSnapshotMode in interface org.jboss.web.tomcat.service.JBossWebMBean

getCacheName

public java.lang.String getCacheName()
Gets the JMX object name of a shared TreeCache to be used for clustered single-sign-on.

Specified by:
getCacheName in interface org.jboss.web.tomcat.service.JBossWebMBean
See Also:
DEFAULT_CACHE_NAME, org.jboss.web.tomcat.service.sso.TreeCacheSSOClusterManager

setCacheName

public void setCacheName(java.lang.String cacheName)
Gets the JMX object name of a shared TreeCache to be used for clustered single-sign-on.

NOTE: TreeCache must be deployed before this service.

Specified by:
setCacheName in interface org.jboss.web.tomcat.service.JBossWebMBean
See Also:
DEFAULT_CACHE_NAME, org.jboss.web.tomcat.service.sso.TreeCacheSSOClusterManager

isUseLocalCache

public boolean isUseLocalCache()
Specified by:
isUseLocalCache in interface org.jboss.web.tomcat.service.JBossWebMBean

setUseLocalCache

public void setUseLocalCache(boolean useLocalCache)
Specified by:
setUseLocalCache in interface org.jboss.web.tomcat.service.JBossWebMBean

isUseJK

public boolean isUseJK()
Specified by:
isUseJK in interface org.jboss.web.tomcat.service.JBossWebMBean

setUseJK

public void setUseJK(boolean useJK)
Specified by:
setUseJK in interface org.jboss.web.tomcat.service.JBossWebMBean

getDeleteWorkDirOnContextDestroy

public boolean getDeleteWorkDirOnContextDestroy()

setDeleteWorkDirOnContextDestroy

public void setDeleteWorkDirOnContextDestroy(boolean deleteFlag)

getHttpHeaderForSSOAuth

public java.lang.String getHttpHeaderForSSOAuth()

setHttpHeaderForSSOAuth

public void setHttpHeaderForSSOAuth(java.lang.String httpHeader)

getSessionCookieForSSOAuth

public java.lang.String getSessionCookieForSSOAuth()

setSessionCookieForSSOAuth

public void setSessionCookieForSSOAuth(java.lang.String sessionC)

setSessionIdAlphabet

public void setSessionIdAlphabet(java.lang.String sessionIdAlphabet)
The SessionIdAlphabet is the set of characters used to create a session Id

Specified by:
setSessionIdAlphabet in interface org.jboss.web.tomcat.service.JBossWebMBean

getSessionIdAlphabet

public java.lang.String getSessionIdAlphabet()
The SessionIdAlphabet is the set of characters used to create a session Id

Specified by:
getSessionIdAlphabet in interface org.jboss.web.tomcat.service.JBossWebMBean

getUseJBossWebLoader

public boolean getUseJBossWebLoader()
Specified by:
getUseJBossWebLoader in interface org.jboss.web.tomcat.service.JBossWebMBean

setUseJBossWebLoader

public void setUseJBossWebLoader(boolean flag)
Specified by:
setUseJBossWebLoader in interface org.jboss.web.tomcat.service.JBossWebMBean

getConfigFile

public java.lang.String getConfigFile()
Specified by:
getConfigFile in interface org.jboss.web.tomcat.service.JBossWebMBean

setConfigFile

public void setConfigFile(java.lang.String configFile)
Specified by:
setConfigFile in interface org.jboss.web.tomcat.service.JBossWebMBean

getSubjectAttributeName

public java.lang.String getSubjectAttributeName()
Specified by:
getSubjectAttributeName in interface org.jboss.web.AbstractWebContainerMBean
Specified by:
getSubjectAttributeName in interface org.jboss.web.tomcat.service.JBossWebMBean
Overrides:
getSubjectAttributeName in class org.jboss.web.AbstractWebContainer

setSubjectAttributeName

public void setSubjectAttributeName(java.lang.String name)
Specified by:
setSubjectAttributeName in interface org.jboss.web.AbstractWebContainerMBean
Specified by:
setSubjectAttributeName in interface org.jboss.web.tomcat.service.JBossWebMBean
Overrides:
setSubjectAttributeName in class org.jboss.web.AbstractWebContainer

isAllowSelfPrivilegedWebApps

public boolean isAllowSelfPrivilegedWebApps()
Specified by:
isAllowSelfPrivilegedWebApps in interface org.jboss.web.tomcat.service.JBossWebMBean

setAllowSelfPrivilegedWebApps

public void setAllowSelfPrivilegedWebApps(boolean allowSelfPrivilegedWebApps)
Specified by:
setAllowSelfPrivilegedWebApps in interface org.jboss.web.tomcat.service.JBossWebMBean

setSecurityManagerService

public void setSecurityManagerService(org.jboss.security.plugins.JaasSecurityManagerServiceMBean mgr)
Specified by:
setSecurityManagerService in interface org.jboss.web.tomcat.service.JBossWebMBean

getFilteredPackages

public java.lang.String[] getFilteredPackages()
Specified by:
getFilteredPackages in interface org.jboss.web.tomcat.service.JBossWebMBean

setFilteredPackages

public void setFilteredPackages(java.lang.String[] pkgs)
Specified by:
setFilteredPackages in interface org.jboss.web.tomcat.service.JBossWebMBean

startService

public void startService()
                  throws java.lang.Exception
Overrides:
startService in class org.jboss.web.AbstractWebContainer
Throws:
java.lang.Exception

stopService

public void stopService()
                 throws java.lang.Exception
Overrides:
stopService in class org.jboss.deployment.SubDeployerSupport
Throws:
java.lang.Exception

startConnectors

public void startConnectors()
                     throws java.lang.Exception
Specified by:
startConnectors in interface org.jboss.web.tomcat.service.JBossWebMBean
Throws:
java.lang.Exception

stopConnectors

public void stopConnectors()
                    throws java.lang.Exception
Specified by:
stopConnectors in interface org.jboss.web.tomcat.service.JBossWebMBean
Throws:
java.lang.Exception

handleNotification

public void handleNotification(javax.management.Notification msg,
                               java.lang.Object handback)
Specified by:
handleNotification in interface javax.management.NotificationListener

getDeployer

public org.jboss.web.AbstractWebDeployer getDeployer(org.jboss.deployment.DeploymentInfo di)
                                              throws java.lang.Exception
Specified by:
getDeployer in class org.jboss.web.AbstractWebContainer
Throws:
java.lang.Exception

accepts

public boolean accepts(org.jboss.deployment.DeploymentInfo sdi)
Specified by:
accepts in interface org.jboss.deployment.SubDeployer
Specified by:
accepts in interface org.jboss.deployment.SubDeployerMBean
Overrides:
accepts in class org.jboss.web.AbstractWebContainer

isSipServletApplication

public static boolean isSipServletApplication(org.jboss.deployment.DeploymentInfo di)
Check if the WEB-INF/sip.xml file can be found in the local class loader of the service deployment info. If it is then it means that a sip servlet application is trying to be deployed

Parameters:
di - the service deployment info
Returns:
true if the service being deployed contains WEB-INF/sip.xml, false otherwise


Copyright © 2008. All Rights Reserved.