站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBoss 4.0.1 sp1 system API Documentation 英文版文档

SARDeployer (JBoss System API) - JBoss 4.0.1 sp1 system API Documentation 英文版文档


org.jboss.deployment
Class SARDeployer

java.lang.Object
  extended byorg.jboss.mx.util.JBossNotificationBroadcasterSupport
      extended byorg.jboss.system.ServiceMBeanSupport
          extended byorg.jboss.deployment.SubDeployerSupport
              extended byorg.jboss.deployment.SARDeployer
All Implemented Interfaces:
javax.management.MBeanRegistration, javax.management.NotificationBroadcaster, javax.management.NotificationEmitter, SARDeployerMBean, Service, ServiceMBean, SubDeployer, SubDeployerMBean

public class SARDeployer
extends SubDeployerSupport
implements SubDeployer, SARDeployerMBean

This is the main Service Deployer API.

Version:
$Revision: 1.52 $
Author:
Marc Fleury, David Maplesden, David Jencks, Jason Dillon, Sacha Labourey, Scott.Stark@jboss.org
See Also:
Service

Nested Class Summary
 
Nested classes inherited from class org.jboss.deployment.SubDeployerSupport
SubDeployerSupport.ClassConfiguration
 
Field Summary
 
Fields inherited from class org.jboss.deployment.SubDeployerSupport
CONFIGURATION, 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.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
 
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
 
Constructor Summary
SARDeployer()
           
 
Method Summary
 boolean accepts(DeploymentInfo di)
          Returns true if this deployer can deploy the given DeploymentInfo.
 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)
          The destroy method invokes destroy on the mbeans associated with the deployment in reverse order relative to create.
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.
protected  File[] listFiles(String urlspec)
           
protected  void parseDocument(DeploymentInfo di)
          Parse the META-INF/jboss-service.xml descriptor
protected  void parseXMLClasspath(DeploymentInfo di)
           
 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.
 
Methods inherited from class org.jboss.deployment.SubDeployerSupport
addDeployableFiles, addDeployableJar, createService, deployUrl, destroyService, getRelativeOrder, getSuffixes, isDeployable, processNestedDeployments, setRelativeOrder, setSuffixes, stopService
 
Methods inherited from class org.jboss.system.ServiceMBeanSupport
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
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
getRelativeOrder, getServiceName, getSuffixes, setRelativeOrder, setSuffixes
 
Methods inherited from interface org.jboss.deployment.SubDeployerMBean
getRelativeOrder, getSuffixes, setRelativeOrder, setSuffixes
 
Methods inherited from interface org.jboss.system.ServiceMBean
getName, getState, getStateString, jbossInternalLifecycle
 
Methods inherited from interface org.jboss.system.Service
create, destroy, start, stop
 

Constructor Detail

SARDeployer

public SARDeployer()
Method Detail

getService

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

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

accepts

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

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

init

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

Specified by:
init in interface SubDeployer
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
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
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
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
Overrides:
destroy in class SubDeployerSupport
Parameters:
di - a DeploymentInfo value

listFiles

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

parseXMLClasspath

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

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

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

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.