KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > deployment > SubDeployer


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

22 package org.jboss.deployment;
23
24 import javax.management.ObjectName JavaDoc;
25
26 /**
27  * The common interface for sub-deployer components which
28  * perform the actual deployment services for application
29  * components.
30  *
31  * @jmx:mbean extends="org.jboss.system.ServiceMBean"
32  *
33  * @version <tt>$Revision: 57108 $</tt>
34  * @author <a HREF="mailto:jason@planet57.com">Jason Dillon</a>
35  * @author <a HREF="mailto:toby.allsopp@peace.com">Toby Allsopp</a>
36  * @author <a HREF="mailto:marc.fleury@jboss.org">Marc Fleury</a>
37  * @author <a HREF="mailto:dimitris@jboss.org">Dimitris Andreadis</a>
38  */

39 public interface SubDeployer
40 {
41    /** The notification type send when a SubDeployer completes init */
42    public static final String JavaDoc INIT_NOTIFICATION = "org.jboss.deployment.SubDeployer.init";
43    /** The notification type send when a SubDeployer completes create */
44    public static final String JavaDoc CREATE_NOTIFICATION = "org.jboss.deployment.SubDeployer.create";
45    /** The notification type send when a SubDeployer completes start */
46    public static final String JavaDoc START_NOTIFICATION = "org.jboss.deployment.SubDeployer.start";
47    /** The notification type send when a SubDeployer completes stop */
48    public static final String JavaDoc STOP_NOTIFICATION = "org.jboss.deployment.SubDeployer.stop";
49    /** The notification type send when a SubDeployer completes destroy */
50    public static final String JavaDoc DESTROY_NOTIFICATION = "org.jboss.deployment.SubDeployer.destroy";
51
52    /**
53     * Get the JMX ObjectName of the service that provides the SubDeployer
54     * @return JMX ObjectName of the service
55     *
56     * @jmx:managed-attribute
57     */

58    public ObjectName JavaDoc getServiceName();
59
60    /**
61     * Get an array of suffixes of interest to this subdeployer
62     * @return array of suffix strings
63     *
64     * @jmx:managed-attribute
65     */

66    public String JavaDoc[] getSuffixes();
67    
68    /**
69     * Get the relative order of the specified suffixes
70     * @return the relative order of the specified suffixes
71     *
72     * @jmx:managed-attribute
73     */

74    public int getRelativeOrder();
75
76    /**
77     * The <code>accepts</code> method is called by MainDeployer to
78     * determine which deployer is suitable for a DeploymentInfo.
79     *
80     * @param sdi a <code>DeploymentInfo</code> value
81     * @return a <code>boolean</code> value
82     *
83     * @jmx:managed-operation
84     */

85    boolean accepts(DeploymentInfo sdi);
86
87    /**
88     * The <code>init</code> method lets the deployer set a few properties
89     * of the DeploymentInfo, such as the watch url.
90     *
91     * @param sdi a <code>DeploymentInfo</code> value
92     * @throws DeploymentException if an error occurs
93     *
94     * @jmx:managed-operation
95     */

96    void init(DeploymentInfo sdi) throws DeploymentException;
97
98    /**
99     * Set up the components of the deployment that do not
100     * refer to other components
101     *
102     * @param sdi a <code>DeploymentInfo</code> value
103     * @throws DeploymentException if an error occurs
104     *
105     * @jmx:managed-operation
106     */

107    void create(DeploymentInfo sdi) throws DeploymentException;
108
109    /**
110     * The <code>start</code> method sets up relationships with other components.
111     *
112     * @param sdi a <code>DeploymentInfo</code> value
113     * @throws DeploymentException if an error occurs
114     *
115     * @jmx:managed-operation
116     */

117    void start(DeploymentInfo sdi) throws DeploymentException;
118
119    /**
120     * The <code>stop</code> method removes relationships between components.
121     *
122     * @param sdi a <code>DeploymentInfo</code> value
123     * @throws DeploymentException if an error occurs
124     *
125     * @jmx:managed-operation
126     */

127    void stop(DeploymentInfo sdi) throws DeploymentException;
128
129    /**
130     * The <code>destroy</code> method removes individual components
131     *
132     * @param sdi a <code>DeploymentInfo</code> value
133     * @throws DeploymentException if an error occurs
134     *
135     * @jmx:managed-operation
136     */

137    void destroy(DeploymentInfo sdi) throws DeploymentException;
138 }
139
Popular Tags