001: /*
002: * JBoss, Home of Professional Open Source.
003: * Copyright 2006, Red Hat Middleware LLC, and individual contributors
004: * as indicated by the @author tags. See the copyright.txt file in the
005: * distribution for a full listing of individual contributors.
006: *
007: * This is free software; you can redistribute it and/or modify it
008: * under the terms of the GNU Lesser General Public License as
009: * published by the Free Software Foundation; either version 2.1 of
010: * the License, or (at your option) any later version.
011: *
012: * This software is distributed in the hope that it will be useful,
013: * but WITHOUT ANY WARRANTY; without even the implied warranty of
014: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
015: * Lesser General Public License for more details.
016: *
017: * You should have received a copy of the GNU Lesser General Public
018: * License along with this software; if not, write to the Free
019: * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
020: * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
021: */
022: package org.jboss.deployment;
023:
024: import javax.management.ObjectName;
025:
026: import org.jboss.system.ServiceMBean;
027:
028: /**
029: * MBean interface for SubDeployers
030: *
031: * @version <tt>$Revision: 57205 $</tt>
032: */
033: public interface SubDeployerMBean extends ServiceMBean {
034: // Attributes ----------------------------------------------------
035:
036: /**
037: * Get the JMX ObjectName of the service that provides the SubDeployer
038: * @return JMX ObjectName of the service
039: */
040: ObjectName getServiceName();
041:
042: /**
043: * Get an array of suffixes of interest to this subdeployer
044: * @return array of suffix strings
045: */
046: String[] getSuffixes();
047:
048: /**
049: * Get the relative order of the specified suffixes
050: * @return the relative order of the specified suffixes
051: */
052: int getRelativeOrder();
053:
054: // Operations ----------------------------------------------------
055:
056: /**
057: * The <code>accepts</code> method is called by MainDeployer
058: * to determine which deployer is suitable for a DeploymentInfo.
059: * @param sdi a <code>DeploymentInfo</code> value
060: * @return a <code>boolean</code> value
061: */
062: boolean accepts(DeploymentInfo sdi);
063:
064: /**
065: * The <code>init</code> method lets the deployer set a few
066: * properties of the DeploymentInfo, such as the watch url.
067: * @param sdi a <code>DeploymentInfo</code> value
068: * @throws DeploymentException if an error occurs
069: */
070: void init(DeploymentInfo sdi) throws DeploymentException;
071:
072: /**
073: * Set up the components of the deployment that do not
074: * refer to other components.
075: * @param sdi a <code>DeploymentInfo</code> value
076: * @throws DeploymentException if an error occurs
077: */
078: void create(DeploymentInfo sdi) throws DeploymentException;
079:
080: /**
081: * The <code>start</code> method sets up relationships
082: * with other components.
083: * @param sdi a <code>DeploymentInfo</code> value
084: * @throws DeploymentException if an error occurs
085: */
086: void start(DeploymentInfo sdi) throws DeploymentException;
087:
088: /**
089: * The <code>stop</code> method removes relationships
090: * between components.
091: * @param sdi a <code>DeploymentInfo</code> value
092: * @throws DeploymentException if an error occurs
093: */
094: void stop(DeploymentInfo sdi) throws DeploymentException;
095:
096: /**
097: * The <code>destroy</code> method removes individual
098: * components
099: * @param sdi a <code>DeploymentInfo</code> value
100: * @throws DeploymentException if an error occurs
101: */
102: void destroy(DeploymentInfo sdi) throws DeploymentException;
103:
104: }
|