org.jboss.deployment
Class SARDeployer

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.deployment.SARDeployer
All Implemented Interfaces:
javax.management.MBeanRegistration, javax.management.NotificationBroadcaster, javax.management.NotificationEmitter, SARDeployerMBean, SubDeployer, SubDeployerExt, SubDeployerExtMBean, SubDeployerMBean, Service, ServiceMBean

public class SARDeployer
extends SubDeployerSupport
implements SARDeployerMBean

This is the main Service Deployer API.

Version:
$Revision: 1.52.2.9 $
Author:
Marc Fleury, David Maplesden, David Jencks, Jason Dillon, Sacha Labourey, Scott Stark, Dimitris Andreadis
See Also:
Service

Nested Class Summary
 
Nested classes/interfaces inherited from class org.jboss.deployment.SubDeployerSupport
SubDeployerSupport.ClassConfiguration
 
Field Summary
 
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.deployment.SARDeployerMBean
OBJECT_NAME
 
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
SARDeployer()
          Default CTOR
 
Method Summary
 void create(DeploymentInfo di)
          Describe create method here.
 void destroy(DeploymentInfo di)
          The destroy method invokes destroy on the mbeans associated with the deployment in reverse order relative to create.
protected  javax.management.ObjectName getObjectName(javax.management.MBeanServer server, javax.management.ObjectName name)
          Sub-classes should override this method if they only need to set their object name during MBean pre-registration.
 DeploymentInfo getService(javax.management.ObjectName serviceName)
          Get the associated service DeploymentInfo if found, null otherwise
protected  void inflateJar(URL url, File destDir, String path)
          The inflateJar copies the jar entries from the jar url jarUrl to the directory destDir.
 void init(DeploymentInfo di)
          Describe init method here.
 boolean isUseNamespaceAwareParser()
           
protected  File[] listFiles(String urlspec)
           
protected  void parseDocument(DeploymentInfo di)
          Parse the META-INF/jboss-service.xml descriptor
protected  void parseXMLClasspath(DeploymentInfo di)
           
 void setUseNamespaceAwareParser(boolean useNamespaceAwareParser)
           
 void start(DeploymentInfo di)
          The start method starts all the mbeans in this DeploymentInfo..
protected  void startService()
          The startService method gets the mbeanProxies for MainDeployer and ServiceController, used elsewhere.
 void stop(DeploymentInfo di)
          The stop method invokes stop on the mbeans associatedw ith the deployment in reverse order relative to create.
protected  void stopService()
          This method stops all the applications in this server.
 
Methods inherited from class org.jboss.deployment.SubDeployerSupport
accepts, addDeployableFiles, addDeployableJar, createService, deployUrl, destroyService, emitNotification, getEnhancedSuffixes, getRelativeOrder, getSuffixes, isDeployable, processNestedDeployments, setEnhancedSuffixes, setRelativeOrder, setSuffixes
 
Methods inherited from class org.jboss.system.ServiceMBeanSupport
create, destroy, getDeploymentInfo, getLog, getName, getNextNotificationSequenceNumber, 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.deployment.SubDeployerExtMBean
getEnhancedSuffixes, setEnhancedSuffixes
 
Methods inherited from interface org.jboss.deployment.SubDeployerMBean
accepts, getRelativeOrder, getServiceName, getSuffixes
 
Methods inherited from interface org.jboss.system.ServiceMBean
getName, getState, getStateString, jbossInternalLifecycle
 
Methods inherited from interface org.jboss.system.Service
create, destroy, start, stop
 
Methods inherited from interface org.jboss.deployment.SubDeployer
getServiceName
 

Constructor Detail

SARDeployer

public SARDeployer()
Default CTOR

Method Detail

isUseNamespaceAwareParser

public boolean isUseNamespaceAwareParser()

setUseNamespaceAwareParser

public void setUseNamespaceAwareParser(boolean useNamespaceAwareParser)

getService

public DeploymentInfo getService(javax.management.ObjectName serviceName)
Get the associated service DeploymentInfo if found, null otherwise

Specified by:
getService in interface SARDeployerMBean
Parameters:
serviceName - a service object name
Returns:
The associated service DeploymentInfo if found, null otherwise

init

public void init(DeploymentInfo di)
          throws DeploymentException
Describe init method here.

Specified by:
init in interface SubDeployer
Specified by:
init in interface SubDeployerMBean
Overrides:
init in class SubDeployerSupport
Parameters:
di - a DeploymentInfo value
Throws:
DeploymentException - if an error occurs

create

public void create(DeploymentInfo di)
            throws DeploymentException
Describe create method here.

Specified by:
create in interface SubDeployer
Specified by:
create in interface SubDeployerMBean
Overrides:
create in class SubDeployerSupport
Parameters:
di - a DeploymentInfo value
Throws:
DeploymentException - if an error occurs

start

public void start(DeploymentInfo di)
           throws DeploymentException
The start method starts all the mbeans in this DeploymentInfo..

Specified by:
start in interface SubDeployer
Specified by:
start in interface SubDeployerMBean
Overrides:
start in class SubDeployerSupport
Parameters:
di - a DeploymentInfo value
Throws:
DeploymentException - if an error occurs

stop

public void stop(DeploymentInfo di)
The stop method invokes stop on the mbeans associatedw ith the deployment in reverse order relative to create.

Specified by:
stop in interface SubDeployer
Specified by:
stop in interface SubDeployerMBean
Overrides:
stop in class SubDeployerSupport
Parameters:
di - the DeploymentInfo value to stop.

destroy

public void destroy(DeploymentInfo di)
The destroy method invokes destroy on the mbeans associated with the deployment in reverse order relative to create.

Specified by:
destroy in interface SubDeployer
Specified by:
destroy in interface SubDeployerMBean
Overrides:
destroy in class SubDeployerSupport
Parameters:
di - a DeploymentInfo value

startService

protected void startService()
                     throws Exception
The startService method gets the mbeanProxies for MainDeployer and ServiceController, used elsewhere.

Overrides:
startService in class SubDeployerSupport
Throws:
Exception - if an error occurs

stopService

protected void stopService()
                    throws Exception
This method stops all the applications in this server.

Overrides:
stopService in class SubDeployerSupport
Throws:
Exception

getObjectName

protected javax.management.ObjectName getObjectName(javax.management.MBeanServer server,
                                                    javax.management.ObjectName name)
                                             throws javax.management.MalformedObjectNameException
Description copied from class: ServiceMBeanSupport
Sub-classes should override this method if they only need to set their object name during MBean pre-registration.

Overrides:
getObjectName in class ServiceMBeanSupport
Throws:
javax.management.MalformedObjectNameException

listFiles

protected File[] listFiles(String urlspec)
                    throws Exception
Throws:
Exception

parseXMLClasspath

protected void parseXMLClasspath(DeploymentInfo di)
                          throws Exception
Parameters:
di -
Throws:
Exception

parseDocument

protected void parseDocument(DeploymentInfo di)
                      throws Exception
Parse the META-INF/jboss-service.xml descriptor

Throws:
Exception

inflateJar

protected void inflateJar(URL url,
                          File destDir,
                          String path)
                   throws DeploymentException,
                          IOException
The inflateJar copies the jar entries from the jar url jarUrl to the directory destDir. It can be used on the whole jar, a directory, or a specific file in the jar.

Parameters:
url - the URL if the directory or entry to copy.
destDir - the File value of the directory in which to place the inflated copies.
Throws:
DeploymentException - if an error occurs
IOException - if an error occurs


Copyright © 2002 JBoss Group, LLC. All Rights Reserved.