KickJava   Java API By Example, From Geeks To Geeks.

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


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 java.io.File JavaDoc;
25 import java.net.MalformedURLException JavaDoc;
26 import java.net.URL JavaDoc;
27 import java.util.Collection JavaDoc;
28
29 import javax.management.ObjectName JavaDoc;
30
31 import org.jboss.deployers.spi.structure.DeploymentContext;
32 import org.jboss.mx.util.ObjectNameFactory;
33 import org.jboss.system.ServiceMBean;
34
35 /**
36  * MainDeployer MBean interface
37  *
38  * @version $Revision: 58278 $
39  */

40 public interface MainDeployerMBean extends
41    ServiceMBean, DeployerMBean, MainDeployerConstants
42 {
43    /** The default ObjectName */
44    ObjectName JavaDoc OBJECT_NAME = ObjectNameFactory.create("jboss.system:service=MainDeployer");
45
46    // Attributes ----------------------------------------------------
47
public org.jboss.deployers.spi.deployment.MainDeployer getKernelMainDeployer();
48    /** set the kernel MainDeployer which will handle deployments */
49    public void setKernelMainDeployer(org.jboss.deployers.spi.deployment.MainDeployer delegate);
50
51    /** Flag indicating whether directory content will be deployed.
52     * The default value is taken from the jboss.deploy.localcopy system property. */

53    boolean getCopyFiles();
54    void setCopyFiles(boolean copyFiles);
55    
56    /** The path to the local tmp directory */
57    File JavaDoc getTempDir();
58    void setTempDir(File JavaDoc tempDir);
59
60    /** The enhanced suffix order */
61    String JavaDoc[] getEnhancedSuffixOrder();
62    void setEnhancedSuffixOrder(String JavaDoc[] enhancedSuffixOrder);
63    
64    /** The ObjectName of the ServiceController */
65    void setServiceController(ObjectName JavaDoc serviceController);
66    
67    /** The path to the local tmp directory in String form */
68    String JavaDoc getTempDirString();
69    
70    /** The ordering of the deployment suffixes */
71    String JavaDoc[] getSuffixOrder();
72
73    // Operations ----------------------------------------------------
74

75    /**
76     * The <code>listDeployed</code> method returns a collection of
77     * DeploymemtInfo objects for the currently deployed packages.
78     * @return a <code>Collection</code> value
79     */

80    Collection JavaDoc listDeployed();
81
82    /**
83     * The <code>listDeployedModules</code> method returns a collection of
84     * SerializableDeploymentInfo objects for the currently deployed packages.
85     * @return a <code>Collection</code> value
86     */

87    Collection JavaDoc listDeployedModules();
88
89    /**
90     * Describe <code>listDeployedAsString</code> method here.
91     * @return a <code>String</code> value
92     */

93    String JavaDoc listDeployedAsString();
94
95    /**
96     * The <code>listIncompletelyDeployed</code> method returns a list of
97     * packages that have not deployed completely. The toString method will
98     * include any exception in the status field.
99     * @return a <code>Collection</code> value
100     */

101    Collection JavaDoc listIncompletelyDeployed();
102
103    /**
104     * The <code>listWaitingForDeployer</code> method returns a collection of
105     * the packages that currently have no identified deployer.
106     * @return a <code>Collection</code> value
107     */

108    Collection JavaDoc listWaitingForDeployer();
109
110    /**
111     * The <code>addDeployer</code> method registers a deployer with the
112     * main deployer. Any waiting packages are tested to see if the new
113     * deployer will deploy them.
114     * @param deployer a <code>SubDeployer</code> value
115     */

116    void addDeployer(SubDeployer deployer);
117
118    /**
119     * The <code>removeDeployer</code> method unregisters a deployer with the
120     * MainDeployer. Deployed packages deployed with this deployer are undeployed.
121     * @param deployer a <code>SubDeployer</code> value
122     */

123    void removeDeployer(SubDeployer deployer);
124
125    /**
126     * The <code>listDeployers</code> method returns a collection of ObjectNames
127     * of deployers registered with the MainDeployer.
128     * @return a <code>Collection<ObjectName></code> value
129     */

130    Collection JavaDoc listDeployers();
131
132    /**
133     * The <code>shutdown</code> method undeploys all deployed packages
134     * in reverse order of their deployement.
135     */

136    void shutdown();
137
138    /**
139     * Describe <code>redeploy</code> method here.
140     * @param urlspec a <code>String</code> value
141     * @exception DeploymentException if an error occurs
142     * @exception java.net.MalformedURLException if an error occurs
143     */

144    void redeploy(String JavaDoc urlspec) throws DeploymentException, MalformedURLException JavaDoc;
145
146    /**
147     * Describe <code>redeploy</code> method here.
148     * @param url an <code>URL</code> value
149     * @exception DeploymentException if an error occurs
150     */

151    void redeploy(URL JavaDoc url) throws DeploymentException;
152
153    /**
154     * Describe <code>redeploy</code> method here.
155     * @param sdi a <code>DeploymentInfo</code> value
156     * @exception DeploymentException if an error occurs
157     */

158    void redeploy(DeploymentInfo sdi) throws DeploymentException;
159
160    /**
161     * The <code>undeploy</code> method undeploys a package identified by a URL
162     * @param url an <code>URL</code> value
163     */

164    void undeploy(URL JavaDoc url) throws DeploymentException;
165
166    /**
167     * The <code>undeploy</code> method undeploys a package identified by a string representation of a URL.
168     * @param urlspec a <code>String</code> value
169     * @exception java.net.MalformedURLException if an error occurs
170     */

171    void undeploy(String JavaDoc urlspec) throws DeploymentException, MalformedURLException JavaDoc;
172
173    /**
174     * The <code>undeploy</code> method undeploys a package represented by a DeploymentInfo object.
175     * @param di a <code>DeploymentInfo</code> value
176     */

177    void undeploy(DeploymentInfo di);
178
179    /**
180     * The <code>deploy</code> method deploys a package identified by a string representation of a URL.
181     * @param urlspec a <code>String</code> value
182     * @exception java.net.MalformedURLException if an error occurs
183     */

184    void deploy(String JavaDoc urlspec) throws DeploymentException, MalformedURLException JavaDoc;
185
186    /**
187     * The <code>deploy</code> method deploys a package identified by a URL
188     * @param url an <code>URL</code> value
189     */

190    void deploy(URL JavaDoc url) throws DeploymentException;
191
192    /**
193     * The <code>deploy</code> method deploys a package represented by a DeploymentInfo object.
194     * @param deployment a <code>DeploymentInfo</code> value
195     * @exception DeploymentException if an error occurs
196     */

197    void deploy(DeploymentInfo deployment) throws DeploymentException;
198
199    /**
200     * The <code>start</code> method starts a package identified by a URL
201     * @param urlspec an URL string value
202     * @jmx.managed-operation
203     */

204    public void start(String JavaDoc urlspec) throws DeploymentException, MalformedURLException JavaDoc;
205
206    /**
207     * The <code>stop</code> method stop a package identified by a URL
208     * @param urlspec an URL string value
209     * @jmx.managed-operation
210     */

211    public void stop(String JavaDoc urlspec) throws DeploymentException, MalformedURLException JavaDoc;
212
213    /**
214     * The <code>isDeployed</code> method tells you if a package identified
215     * by a string representation of a URL is currently deployed.
216     * @param url a <code>String</code> value
217     * @return a <code>boolean</code> value
218     * @exception java.net.MalformedURLException if an error occurs
219     */

220    boolean isDeployed(String JavaDoc url) throws MalformedURLException JavaDoc;
221
222    /**
223     * The <code>isDeployed</code> method tells you if a packaged identified
224     * by a URL is deployed.
225     * @param url an <code>URL</code> value
226     * @return a <code>boolean</code> value
227     */

228    boolean isDeployed(URL JavaDoc url);
229
230    /**
231     * The <code>getDeployment</code> method returns the DeploymentInfo object
232     * for the URL supplied.
233     * @param url an <code>URL</code> value
234     * @return a <code>DeploymentContext</code> value
235     */

236    DeploymentContext getDeployment(URL JavaDoc url);
237
238    /**
239     * The <code>getWatchUrl</code> method returns the URL that,
240     * when modified, indicates that a redeploy is needed.
241     * @param url an <code>URL</code> value
242     * @return a <code>URL</code> value
243     */

244    URL JavaDoc getWatchUrl(URL JavaDoc url);
245
246    /**
247     * Check the current deployment states and generate an
248     * IncompleteDeploymentException if there are mbeans
249     * waiting for depedencies.
250     * @exception IncompleteDeploymentException
251     */

252    void checkIncompleteDeployments() throws DeploymentException;
253
254 }
255
Popular Tags