KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > deployment > scanner > URLDeploymentScannerMBean


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.scanner;
23
24 import java.net.MalformedURLException JavaDoc;
25 import java.net.URL JavaDoc;
26 import java.util.List JavaDoc;
27
28 import org.jboss.net.protocol.URLLister.URLFilter;
29
30 /**
31  * URLDeploymentScanner MBean interface.
32  *
33  * @author <a HREF="mailto:jason@planet57.com">Jason Dillon</a>
34  * @author <a HREF="mailto:dimitris@jboss.org">Dimitris Andreadis</a>
35  * @version $Revision: 57108 $
36  */

37 public interface URLDeploymentScannerMBean extends DeploymentScannerMBean
38 {
39    // Attributes ----------------------------------------------------
40

41    void setRecursiveSearch(boolean recurse);
42    boolean getRecursiveSearch();
43
44    void setURLList(List JavaDoc list);
45    List JavaDoc getURLList();
46    
47    void setURLComparator(String JavaDoc classname)
48       throws ClassNotFoundException JavaDoc, IllegalAccessException JavaDoc, InstantiationException JavaDoc;
49    String JavaDoc getURLComparator();
50
51    void setFilter(String JavaDoc classname)
52       throws ClassNotFoundException JavaDoc, IllegalAccessException JavaDoc, InstantiationException JavaDoc;
53    String JavaDoc getFilter();
54
55    void setFilterInstance(URLFilter filter);
56    URLFilter getFilterInstance();
57
58    void setURLs(String JavaDoc listspec) throws MalformedURLException JavaDoc;
59    
60    // Operations ----------------------------------------------------
61

62    void addURL(URL JavaDoc url);
63
64    void removeURL(URL JavaDoc url);
65
66    boolean hasURL(URL JavaDoc url);
67
68    void addURL(String JavaDoc urlspec) throws MalformedURLException JavaDoc;
69
70    void removeURL(String JavaDoc urlspec) throws MalformedURLException JavaDoc;
71
72    boolean hasURL(String JavaDoc urlspec) throws MalformedURLException JavaDoc;
73    
74    /**
75     * Temporarily ignore changes (addition, updates, removal) to a particular
76     * deployment, identified by its deployment URL. The deployment URL is different
77     * from the 'base' URLs that are scanned by the scanner (e.g. the full path to
78     * deploy/jmx-console.war vs. deploy/). This can be used to avoid an attempt
79     * by the scanner to deploy/redeploy/undeploy a URL that is being modified.
80     *
81     * To re-enable scanning of changes for a URL, use resumeDeployment(URL, boolean).
82     */

83    void suspendDeployment(URL JavaDoc url);
84
85    /**
86     * Re-enables scanning of a particular deployment URL, previously suspended
87     * using suspendDeployment(URL). If the markUpToDate flag is true then the
88     * deployment module will be considered up-to-date during the next scan.
89     * If the flag is false, at the next scan the scanner will check the
90     * modification date to decide if the module needs deploy/redeploy/undeploy.
91     */

92    void resumeDeployment(URL JavaDoc url, boolean markUpToDate);
93
94    /**
95     * Lists all urls deployed by the scanner, each URL on a new line.
96     */

97    public String JavaDoc listDeployedURLs();
98
99 }
100
Popular Tags