KickJava   Java API By Example, From Geeks To Geeks.

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


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 javax.management.ObjectName JavaDoc;
25
26 import org.jboss.system.Service;
27
28 /**
29  * Provides the basic interface for a deployment scanner.
30  *
31  * <p>A deployment scanner scans for new, removed or changed
32  * deployments.
33  *
34  * @jmx:mbean extends="org.jboss.system.ServiceMBean"
35  *
36  * @version <tt>$Revision: 57108 $</tt>
37  * @author <a HREF="mailto:jason@planet57.com">Jason Dillon</a>
38  */

39 public interface DeploymentScanner
40    extends Service
41 {
42    /**
43     * The ObjectName of the {@link Deployer} which we will use.
44     *
45     * @param deployerName The object name of the deployer to use.
46     *
47     * @jmx:managed-attribute
48     */

49    void setDeployer(ObjectName JavaDoc deployerName);
50
51    /**
52     * Get the ObjectName of the {@link Deployer} which we are using.
53     *
54     * @return The object name of the deployer we are using.
55     *
56     * @jmx:managed-attribute
57     */

58    ObjectName JavaDoc getDeployer();
59
60    /**
61     * Set the scan period for the scanner.
62     *
63     * @param period This is the time in milliseconds between scans.
64     *
65     * @throws IllegalArgumentException Period value out of range.
66     *
67     * @jmx:managed-attribute
68     */

69    void setScanPeriod(long period);
70
71    /**
72     * Get the scan period for the scanner.
73     *
74     * @return This is the time in milliseconds between scans.
75     */

76    long getScanPeriod();
77
78    /**
79     * Disable or enable the period based deployment scanning.
80     *
81     * <p>Manual scanning can still be performed by calling
82     * {@link #scan}.
83     *
84     * @param flag True to enable or false to disable period
85     * based scanning.
86     *
87     * @jmx:managed-attribute
88     */

89    void setScanEnabled(boolean flag);
90
91    /**
92     * Check if period based scanning is enabled.
93     *
94     * @return True if enabled, false if disabled.
95     *
96     * @jmx:managed-attribute
97     */

98    boolean isScanEnabled();
99
100    /**
101     * Scan for deployment changes.
102     *
103     * @throws IllegalStateException Not initialized.
104     * @throws Exception Scan failed.
105     *
106     * @jmx:managed-operation
107     */

108    void scan() throws Exception JavaDoc;
109 }
110
Popular Tags