/***************************************
* *
* JBoss: The OpenSource J2EE WebOS *
* *
* Distributable under LGPL license. *
* See terms of license at gnu.org. *
* *
***************************************/
package org.jboss.deployment;
import javax.management.ObjectName;
/**
* The common interface for sub-deployer components which
* perform the actual deployment services for application
* components.
*
* @jmx:mbean extends="org.jboss.system.ServiceMBean"
*
* @version $Revision: 1.2.4.2 $
* @author Jason Dillon
* @author Toby Allsopp
* @author Marc Fleury
*/
public interface SubDeployer
{
/** The notification type send when a SubDeployer completes init */
public static final String INIT_NOTIFICATION = "org.jboss.deployment.SubDeployer.init";
/** The notification type send when a SubDeployer completes create */
public static final String CREATE_NOTIFICATION = "org.jboss.deployment.SubDeployer.create";
/** The notification type send when a SubDeployer completes start */
public static final String START_NOTIFICATION = "org.jboss.deployment.SubDeployer.start";
/** The notification type send when a SubDeployer completes stop */
public static final String STOP_NOTIFICATION = "org.jboss.deployment.SubDeployer.stop";
/** The notification type send when a SubDeployer completes destroy */
public static final String DESTROY_NOTIFICATION = "org.jboss.deployment.SubDeployer.destroy";
/** Get the JMX ObjectName of the service that provides the SubDeployer
* @return JMX ObjectName of the service
*/
public ObjectName getServiceName();
/**
* The accepts method is called by MainDeployer to
* determine which deployer is suitable for a DeploymentInfo.
*
* @param sdi a DeploymentInfo value
* @return a boolean value
*
* @jmx:managed-operation
*/
boolean accepts(DeploymentInfo sdi);
/**
* The init method lets the deployer set a few properties
* of the DeploymentInfo, such as the watch url.
*
* @param sdi a DeploymentInfo value
* @throws DeploymentException if an error occurs
*
* @jmx:managed-operation
*/
void init(DeploymentInfo sdi) throws DeploymentException;
/**
* Set up the components of the deployment that do not
* refer to other components
*
* @param sdi a DeploymentInfo value
* @throws DeploymentException Failed to deploy
*
* @jmx:managed-operation
*/
void create(DeploymentInfo sdi) throws DeploymentException;
/**
* The start method sets up relationships with other components.
*
* @param sdi a DeploymentInfo value
* @throws DeploymentException if an error occurs
*
* @jmx:managed-operation
*/
void start(DeploymentInfo sdi) throws DeploymentException;
/**
* The stop method removes relationships between components.
*
* @param sdi a DeploymentInfo value
* @throws DeploymentException if an error occurs
*
* @jmx:managed-operation
*/
void stop(DeploymentInfo sdi) throws DeploymentException;
/**
* The destroy method removes individual components
*
* @param sdi a DeploymentInfo value
* @throws DeploymentException if an error occurs
*
* @jmx:managed-operation
*/
void destroy(DeploymentInfo sdi) throws DeploymentException;
}