01: /*
02: * BEGIN_HEADER - DO NOT EDIT
03: *
04: * The contents of this file are subject to the terms
05: * of the Common Development and Distribution License
06: * (the "License"). You may not use this file except
07: * in compliance with the License.
08: *
09: * You can obtain a copy of the license at
10: * https://open-esb.dev.java.net/public/CDDLv1.0.html.
11: * See the License for the specific language governing
12: * permissions and limitations under the License.
13: *
14: * When distributing Covered Code, include this CDDL
15: * HEADER in each file and include the License file at
16: * https://open-esb.dev.java.net/public/CDDLv1.0.html.
17: * If applicable add the following below this CDDL HEADER,
18: * with the fields enclosed by brackets "[]" replaced with
19: * your own identifying information: Portions Copyright
20: * [year] [name of copyright owner]
21: */
22:
23: /*
24: * @(#)InstallerMBean.java
25: * Copyright 2004-2007 Sun Microsystems, Inc. All Rights Reserved.
26: *
27: * END_HEADER - DO NOT EDIT
28: */
29: package javax.jbi.management;
30:
31: import javax.management.ObjectName;
32:
33: /**
34: * The InstallerMBean defines standard installation and uninstallation controls
35: * for components. InstallerMBeans are created by the
36: * {@link InstallationServiceMBean}. The InstallerMBean offers controls to
37: * allow an administrative tool to:
38: * <ul>
39: * <li>Install the component from the installation package.</li>
40: * <li>Uninstall the component.</li>
41: * <li>Check the installation status of the component.</li>
42: * <li>Get the file path to the component's installation root directory.</li>
43: * </ul>
44: *
45: * @author JSR208 Expert Group
46: */
47: public interface InstallerMBean {
48: /**
49: * Get the installer configuration MBean name for this component.
50: *
51: * @return the MBean object name of the Installer Configuration MBean;
52: * <code>null</code> if none is provided by this component
53: * @exception javax.jbi.JBIException if the component is not in the
54: * appropriate state (after install() but before life cycle
55: * initialization), or if any error occurs during processing
56: */
57: ObjectName getInstallerConfigurationMBean()
58: throws javax.jbi.JBIException;
59:
60: /**
61: * Get the installation root directory path for this component.
62: *
63: * @return the full installation path of this component; this must be in
64: * absolute path name form, in platform-specific format; must be
65: * non-null and non-empty
66: */
67: String getInstallRoot();
68:
69: /**
70: * Install a component.
71: * <p>
72: * Note that the implementation must leave the component in its
73: * installed, shutdown state. Automatic starting of components during
74: * installation by implementations is not allowed.
75: *
76: * @return JMX ObjectName representing the LifeCycleMBean for the installed
77: * component, or <code>null</code> if the installation did not
78: * complete
79: * @exception javax.jbi.JBIException if the installation fails
80: */
81: ObjectName install() throws javax.jbi.JBIException;
82:
83: /**
84: * Determine whether or not the component is installed.
85: *
86: * @return <code>true</code> if this component is currently installed,
87: * otherwise <code>false</code>
88: */
89: boolean isInstalled();
90:
91: /**
92: * Uninstall the component. This completely removes the component from the
93: * JBI system.
94: *
95: * @exception javax.jbi.JBIException if the uninstallation fails
96: */
97: void uninstall() throws javax.jbi.JBIException;
98: }
|