/*
* JBoss, Home of Professional Open Source
* Copyright 2005, JBoss Inc., and individual contributors as indicated
* by the @authors tag. See the copyright.txt in the distribution for a
* full listing of individual contributors.
*
* This is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation; either version 2.1 of
* the License, or (at your option) any later version.
*
* This software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this software; if not, write to the Free
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
package org.jboss.deployment;

/**
 * MBean interface.
 */
public interface SubDeployerMBean extends org.jboss.system.ServiceMBean {

   /**
    * The <code>accepts</code> method is called by MainDeployer to determine which deployer is suitable for a DeploymentInfo.
    * @param sdi a <code>DeploymentInfo</code> value
    * @return a <code>boolean</code> value
    */
  boolean accepts(org.jboss.deployment.DeploymentInfo sdi) ;

   /**
    * The <code>init</code> method lets the deployer set a few properties of the DeploymentInfo, such as the watch url.
    * @param sdi a <code>DeploymentInfo</code> value
    * @throws DeploymentException if an error occurs
    */
  void init(org.jboss.deployment.DeploymentInfo sdi) throws org.jboss.deployment.DeploymentException;

   /**
    * Set up the components of the deployment that do not refer to other components
    * @param sdi a <code>DeploymentInfo</code> value
    * @throws DeploymentException Failed to deploy
    */
  void create(org.jboss.deployment.DeploymentInfo sdi) throws org.jboss.deployment.DeploymentException;

   /**
    * The <code>start</code> method sets up relationships with other components.
    * @param sdi a <code>DeploymentInfo</code> value
    * @throws DeploymentException if an error occurs
    */
  void start(org.jboss.deployment.DeploymentInfo sdi) throws org.jboss.deployment.DeploymentException;

   /**
    * The <code>stop</code> method removes relationships between components.
    * @param sdi a <code>DeploymentInfo</code> value
    * @throws DeploymentException if an error occurs
    */
  void stop(org.jboss.deployment.DeploymentInfo sdi) throws org.jboss.deployment.DeploymentException;

   /**
    * The <code>destroy</code> method removes individual components
    * @param sdi a <code>DeploymentInfo</code> value
    * @throws DeploymentException if an error occurs
    */
  void destroy(org.jboss.deployment.DeploymentInfo sdi) throws org.jboss.deployment.DeploymentException;

}
