org.jboss.jetty
Class JettyService
java.lang.Object
org.jboss.mx.util.JBossNotificationBroadcasterSupport
org.jboss.system.ServiceMBeanSupport
org.jboss.deployment.SubDeployerSupport
org.jboss.web.AbstractWebContainer
org.jboss.jetty.JettyService
- All Implemented Interfaces:
- MBeanRegistration, NotificationBroadcaster, NotificationEmitter, org.jboss.deployment.SubDeployer, org.jboss.deployment.SubDeployerExt, org.jboss.deployment.SubDeployerExtMBean, org.jboss.deployment.SubDeployerMBean, JettyServiceMBean, org.jboss.system.Service, org.jboss.system.ServiceMBean, org.jboss.web.AbstractWebContainerMBean
public class JettyService
- extends org.jboss.web.AbstractWebContainer
- implements JettyServiceMBean, MBeanRegistration
JettyService
A service to launch jetty as the webserver for JBoss.
|
Nested Class Summary |
static class |
JettyService.ConfigurationData
ConfigurationData
Holds info that the jboss API sets on the
AbstractWebContainer but is needed by the
AbstractWebDeployer. |
| 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 |
| 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.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 |
| Methods inherited from class org.jboss.web.AbstractWebContainer |
accepts, addDeployedApp, create, destroy, getAcceptNonWarDirs, getClassLoaderURLs, getCompileClasspath, getConfig, getDefaultSecurityDomain, getDeployedApp, getDeployedApplications, getJava2ClassLoadingCompliance, getLenientEjbLink, getSubjectAttributeName, getUnpackWars, init, isDeployed, parseMetaData, processNestedDeployments, removeDeployedApp, setAcceptNonWarDirs, setConfig, setDefaultSecurityDomain, setJava2ClassLoadingCompliance, setLenientEjbLink, setSubjectAttributeName, setUnpackWars, start, stop |
| Methods inherited from class org.jboss.deployment.SubDeployerSupport |
addDeployableFiles, addDeployableJar, deployUrl, 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, preDeregister, 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, getDefaultSecurityDomain, getDeployedApplications, getLenientEjbLink, isDeployed, setAcceptNonWarDirs, setConfig, setDefaultSecurityDomain, setLenientEjbLink |
| Methods inherited from interface org.jboss.deployment.SubDeployerExtMBean |
getEnhancedSuffixes, setEnhancedSuffixes |
| Methods inherited from interface org.jboss.deployment.SubDeployerMBean |
accepts, 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 |
NAME
public static final String NAME
- See Also:
- Constant Field Values
_server
protected MBeanServer _server
_jetty
protected Jetty _jetty
_jettyConfig
protected Element _jettyConfig
_supportJSR77
protected boolean _supportJSR77
_webDefaultResource
protected String _webDefaultResource
subDeployerProxy
protected org.jboss.deployment.SubDeployerExt subDeployerProxy
JettyService
public JettyService()
- Constructor
preRegister
public ObjectName preRegister(MBeanServer server,
ObjectName name)
throws Exception
- Listen for our registration as an mbean and remember our name.
- Specified by:
preRegister in interface MBeanRegistration- Overrides:
preRegister in class org.jboss.system.ServiceMBeanSupport
- Throws:
Exception- See Also:
ServiceMBeanSupport.preRegister(javax.management.MBeanServer, javax.management.ObjectName)
postRegister
public void postRegister(Boolean done)
- Listen for post-mbean registration and set up the jetty
mbean infrastructure so it can generate mbeans according
to the elements contained in the element
of the jboss-service.xml file.
- Specified by:
postRegister in interface MBeanRegistration- Overrides:
postRegister in class org.jboss.system.ServiceMBeanSupport
- See Also:
ServiceMBeanSupport.postRegister(java.lang.Boolean)
getName
public String getName()
- Specified by:
getName in interface org.jboss.system.ServiceMBean- Overrides:
getName in class org.jboss.system.ServiceMBeanSupport
- See Also:
ServiceMBeanSupport.getName()
createService
public void createService()
throws Exception
- Overrides:
createService in class org.jboss.deployment.SubDeployerSupport
- Throws:
Exception- See Also:
SubDeployerSupport.createService()
startService
public void startService()
throws Exception
- Start up the jetty service. Also, as we need to be able
to have interceptors injected into us to support jboss.ws:service=WebService,
we need to create a proxy to ourselves and register that proxy with the
mainDeployer.
See SubDeployerInterceptorSupport
- Overrides:
startService in class org.jboss.web.AbstractWebContainer
- Throws:
Exception- See Also:
AbstractWebContainer.startService()
stopService
public void stopService()
throws Exception
- Overrides:
stopService in class org.jboss.deployment.SubDeployerSupport
- Throws:
Exception
destroyService
public void destroyService()
throws Exception
- Overrides:
destroyService in class org.jboss.deployment.SubDeployerSupport
- Throws:
Exception
getSupportJSR77
public boolean getSupportJSR77()
- Specified by:
getSupportJSR77 in interface JettyServiceMBean
setSupportJSR77
public void setSupportJSR77(boolean supportJSR77)
- Specified by:
setSupportJSR77 in interface JettyServiceMBean
getWebDefaultResource
public String getWebDefaultResource()
- Get the custom webdefault.xml file.
- Specified by:
getWebDefaultResource in interface JettyServiceMBean
setWebDefaultResource
public void setWebDefaultResource(String webDefaultResource)
- Set a custom webdefault.xml file.
- Specified by:
setWebDefaultResource in interface JettyServiceMBean
getConfigurationElement
public Element getConfigurationElement()
- Get the extended Jetty configuration XML fragment
- Returns:
- Jetty XML fragment embedded in jboss-service.xml
setConfigurationElement
public void setConfigurationElement(Element configElement)
- Configure Jetty
- Specified by:
setConfigurationElement in interface JettyServiceMBean
- Parameters:
configElement - XML fragment from jboss-service.xml
performDeploy
public void performDeploy(org.jboss.web.WebApplication webApp,
String warUrl,
org.jboss.web.AbstractWebContainer.WebDescriptorParser parser)
throws org.jboss.deployment.DeploymentException
- Old deployment method from AbstractWebContainer.
TODO remove this?
- Parameters:
webApp - warUrl - parser -
- Throws:
org.jboss.deployment.DeploymentException
performUndeploy
public void performUndeploy(String warUrl)
throws org.jboss.deployment.DeploymentException
- Old undeploy method from AbstractWebContainer.
TODO remove?
- Parameters:
warUrl -
- Throws:
org.jboss.deployment.DeploymentException
getDeployer
public org.jboss.web.AbstractWebDeployer getDeployer(org.jboss.deployment.DeploymentInfo di)
throws Exception
- Specified by:
getDeployer in class org.jboss.web.AbstractWebContainer
- Throws:
Exception- See Also:
AbstractWebContainer.getDeployer(org.jboss.deployment.DeploymentInfo)
Copyright © 1995-2011 Mort Bay Consulting. All Rights Reserved.