org.jboss.deployment
Class SARDeployer

java.lang.Object
  extended byorg.jboss.mx.util.JBossNotificationBroadcasterSupport (src) 
      extended byorg.jboss.system.ServiceMBeanSupport (src) 
          extended byorg.jboss.deployment.SubDeployerSupport (src) 
              extended byorg.jboss.deployment.SARDeployer
All Implemented Interfaces:
MBeanRegistration (src) , NotificationBroadcaster (src) , NotificationEmitter (src) , Service (src) , ServiceMBean (src) , SubDeployer (src)

public class SARDeployer
extends SubDeployerSupport (src)
implements SubDeployer (src)

This is the main Service Deployer API.

See Also:
Service (src)

Nested Class Summary
 
Nested classes inherited from class org.jboss.deployment.SubDeployerSupport (src)
SubDeployerSupport.ClassConfiguration (src)
 
Field Summary
 
Fields inherited from class org.jboss.deployment.SubDeployerSupport (src)
CONFIGURATION, mainDeployer, nativePrefix, nativeSuffix, relativeOrder, suffixes, tempDeployDir
 
Fields inherited from class org.jboss.system.ServiceMBeanSupport (src)
log, server, SERVICE_CONTROLLER_SIG, serviceName
 
Fields inherited from interface org.jboss.deployment.SubDeployer (src)
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
 
Fields inherited from interface org.jboss.system.ServiceMBean (src)
CREATE_EVENT, CREATED, DESTROY_EVENT, DESTROYED, FAILED, REGISTERED, START_EVENT, STARTED, STARTING, states, STOP_EVENT, STOPPED, STOPPING, UNREGISTERED
 
Constructor Summary
SARDeployer()
           
 
Method Summary
 boolean accepts(DeploymentInfo (src)  di)
          Returns true if this deployer can deploy the given DeploymentInfo.
 void create(DeploymentInfo (src)  di)
          Describe create method here.
 void destroy(DeploymentInfo (src)  di)
          The destroy method invokes destroy on the mbeans associated with the deployment in reverse order relative to create.
protected  ObjectName (src) getObjectName(MBeanServer (src)  server, ObjectName (src)  name)
          Sub-classes should override this method if they only need to set their object name during MBean pre-registration.
 DeploymentInfo (src) getService(ObjectName (src)  serviceName)
          The destroy method invokes destroy on the mbeans associated with the deployment in reverse order relative to create.
protected  void inflateJar(java.net.URL url, java.io.File destDir, java.lang.String path)
          The inflateJar copies the jar entries from the jar url jarUrl to the directory destDir.
 void init(DeploymentInfo (src)  di)
          Describe init method here.
 boolean isUseNamespaceAwareParser()
           
protected  java.io.File[] listFiles(java.lang.String urlspec)
           
protected  void parseDocument(DeploymentInfo (src)  di)
          Parse the META-INF/jboss-service.xml descriptor
protected  void parseXMLClasspath(DeploymentInfo (src)  di)
           
 void setUseNamespaceAwareParser(boolean useNamespaceAwareParser)
           
 void start(DeploymentInfo (src)  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 (src)  di)
          The stop method invokes stop on the mbeans associatedw ith the deployment in reverse order relative to create.
 
Methods inherited from class org.jboss.deployment.SubDeployerSupport (src)
addDeployableFiles, addDeployableJar, createService, deployUrl, destroyService, emitNotification, getRelativeOrder, getSuffixes, isDeployable, processNestedDeployments, setRelativeOrder, setSuffixes, stopService
 
Methods inherited from class org.jboss.system.ServiceMBeanSupport (src)
create, destroy, 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 (src)
addNotificationListener, getNotificationInfo, handleNotification, 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.SubDeployer (src)
getRelativeOrder, getServiceName, getSuffixes, setRelativeOrder, setSuffixes
 

Constructor Detail

SARDeployer

public SARDeployer()
Method Detail

isUseNamespaceAwareParser

public boolean isUseNamespaceAwareParser()

setUseNamespaceAwareParser

public void setUseNamespaceAwareParser(boolean useNamespaceAwareParser)

getService

public DeploymentInfo (src)  getService(ObjectName (src)  serviceName)
The destroy method invokes destroy on the mbeans associated with the deployment in reverse order relative to create.

Parameters:
serviceName - a service object name
Returns:
The associated service DeploymentInfo if found, null otherwise

accepts

public boolean accepts(DeploymentInfo (src)  di)
Returns true if this deployer can deploy the given DeploymentInfo.

Specified by:
accepts in interface SubDeployer (src)
Parameters:
di - a DeploymentInfo value
Returns:
True if this deployer can deploy the given DeploymentInfo.

init

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

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

create

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

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

start

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

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

stop

public void stop(DeploymentInfo (src)  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 (src)
Overrides:
stop in class SubDeployerSupport (src)
Parameters:
di - the DeploymentInfo value to stop.

destroy

public void destroy(DeploymentInfo (src)  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 (src)
Overrides:
destroy in class SubDeployerSupport (src)
Parameters:
di - a DeploymentInfo value

listFiles

protected java.io.File[] listFiles(java.lang.String urlspec)
                            throws java.lang.Exception
Throws:
java.lang.Exception

parseXMLClasspath

protected void parseXMLClasspath(DeploymentInfo (src)  di)
                          throws java.lang.Exception
Parameters:
di -
Throws:
java.lang.Exception

startService

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

Overrides:
startService in class SubDeployerSupport (src)
Throws:
java.lang.Exception - if an error occurs

getObjectName

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

Overrides:
getObjectName in class ServiceMBeanSupport (src)
Throws:
MalformedObjectNameException (src)

parseDocument

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

Throws:
java.lang.Exception

inflateJar

protected void inflateJar(java.net.URL url,
                          java.io.File destDir,
                          java.lang.String path)
                   throws DeploymentException (src) ,
                          java.io.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 (src) - if an error occurs
java.io.IOException - if an error occurs