/*
* 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.
 * @see org.jboss.system.Service
 */
public interface SARDeployerMBean extends org.jboss.deployment.SubDeployerMBean {

   //default object name
   public static final javax.management.ObjectName OBJECT_NAME = org.jboss.mx.util.ObjectNameFactory.create("jboss.system:service=ServiceDeployer");

   /**
    * The destroy method invokes destroy on the mbeans associated with the deployment in reverse order relative to create.
    * @param di a <code>DeploymentInfo</code> value
    * @return The associated service DeploymentInfo if found, null otherwise
    */
  org.jboss.deployment.DeploymentInfo getService(javax.management.ObjectName serviceName) ;

   /**
    * Returns true if this deployer can deploy the given DeploymentInfo.
    * @return True if this deployer can deploy the given DeploymentInfo.
    */
  boolean accepts(org.jboss.deployment.DeploymentInfo di) ;

   /**
    * The init method parses the jboss-service.xml descriptor for the service.
    * @param di a <code>DeploymentInfo</code> value
    * @exception DeploymentException if an error occurs
    */
  void init(org.jboss.deployment.DeploymentInfo di) throws org.jboss.deployment.DeploymentException;

   /**
    * The create method creates the MBeans associated with the deployment.
    * @param di a <code>DeploymentInfo</code> value
    * @exception DeploymentException if an error occurs
    */
  void create(org.jboss.deployment.DeploymentInfo di) throws org.jboss.deployment.DeploymentException;

   /**
    * The <code>start</code> method starts all the mbeans in this DeploymentInfo..
    * @param di a <code>DeploymentInfo</code> value
    * @exception DeploymentException if an error occurs
    */
  void start(org.jboss.deployment.DeploymentInfo di) throws org.jboss.deployment.DeploymentException;

   /**
    * The stop method invokes stop on the mbeans associatedw ith the deployment in reverse order relative to create.
    * @param di the <code>DeploymentInfo</code> value to stop.
    */
  void stop(org.jboss.deployment.DeploymentInfo di) ;

   /**
    * The destroy method invokes destroy on the mbeans associated with the deployment in reverse order relative to create.
    * @param di a <code>DeploymentInfo</code> value
    */
  void destroy(org.jboss.deployment.DeploymentInfo di) ;

}
