KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > enterprise > ManagementObjectManager


1 /*
2  * The contents of this file are subject to the terms
3  * of the Common Development and Distribution License
4  * (the License). You may not use this file except in
5  * compliance with the License.
6  *
7  * You can obtain a copy of the license at
8  * https://glassfish.dev.java.net/public/CDDLv1.0.html or
9  * glassfish/bootstrap/legal/CDDLv1.0.txt.
10  * See the License for the specific language governing
11  * permissions and limitations under the License.
12  *
13  * When distributing Covered Code, include this CDDL
14  * Header Notice in each file and include the License file
15  * at glassfish/bootstrap/legal/CDDLv1.0.txt.
16  * If applicable, add the following below the CDDL Header,
17  * with the fields enclosed by brackets [] replaced by
18  * you own identifying information:
19  * "Portions Copyrighted [year] [name of copyright owner]"
20  *
21  * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
22  */

23 package com.sun.enterprise;
24
25 import com.sun.enterprise.deployment.*;
26 import javax.management.*;
27 import javax.management.ObjectName JavaDoc;
28 import com.sun.enterprise.management.agent.MEJBUtility;
29
30 /**
31  * The ManagementObjectManager provides registration and unregistration
32  * functionality for managed objects defined by JSR77.
33  *
34  * @author Sanjeev Krishnan
35  */

36 public interface ManagementObjectManager {
37
38     public static final String JavaDoc RUNNING_STATE="Running";
39     public static final String JavaDoc STOPPED_STATE="Stopped";
40     public static final String JavaDoc FAILED_STATE="Failed";
41     
42     /* Constants for jsr77 modules */
43     public static String JavaDoc J2EE_TYPE_EJB_MODULE = "EJBModule";
44     public static String JavaDoc J2EE_TYPE_WEB_MODULE = "WebModule";
45     public static String JavaDoc J2EE_TYPE_RAR_MODULE = "ResourceAdapterModule";
46     public static String JavaDoc J2EE_TYPE_ACC_MODULE = "AppClientModule";
47     public static String JavaDoc J2EE_TYPE_APPLICATION = "J2EEApplication";
48
49     void registerJ2EEDomain();
50
51     void registerJ2EEServer();
52     void registerDasJ2EEServers();
53     void registerDasJ2EEServer(String JavaDoc serverName);
54     void unregisterDasJ2EEServer(String JavaDoc serverName);
55     public String JavaDoc getServerBaseON(boolean amx, String JavaDoc serverName);
56
57     void registerJCAConnectionFactory(String JavaDoc jcaResName, String JavaDoc jcaConnFactName,
58                       String JavaDoc managedConFact);
59
60     void registerJCAManagedConnectionFactory(String JavaDoc connFactName);
61
62     void registerJCAResource(String JavaDoc name, String JavaDoc raName,
63                             String JavaDoc username, String JavaDoc password,
64                             String JavaDoc[] propNames, String JavaDoc[] propValues);
65
66     void registerJDBCDataSource(String JavaDoc dsJndiName,
67                             String JavaDoc dsName,
68                             String JavaDoc url,
69                             String JavaDoc username,
70                             String JavaDoc password,
71                             String JavaDoc[] propNames,
72                             String JavaDoc[] propValues);
73
74     void registerJDBCDriver(String JavaDoc name);
75
76     void registerJDBCResource(String JavaDoc name);
77
78     void registerJMSResource(String JavaDoc name, String JavaDoc resType,
79                                     String JavaDoc username, String JavaDoc password,
80                                     String JavaDoc[] propNames, String JavaDoc[] propValues);
81     
82     void registerAdminObjectResource(String JavaDoc name, String JavaDoc raName, String JavaDoc resType,
83                             String JavaDoc[] propNames, String JavaDoc[] propValues);
84
85     void registerJNDIResource(String JavaDoc name);
86
87     void registerJTAResource(String JavaDoc name);
88
89     void registerJVM();
90
91     void registerJavaMailResource(String JavaDoc name);
92     
93     void registerRMI_IIOPResource(String JavaDoc name);
94
95     void unregisterStandAloneModule(String JavaDoc moduleType, String JavaDoc name);
96
97     void unregisterJCAResource(String JavaDoc name) throws Exception JavaDoc;
98
99     void unregisterJavaMailResource(String JavaDoc name) throws Exception JavaDoc;
100     
101     void unregisterJMSResource(String JavaDoc name)throws Exception JavaDoc;
102
103     void unregisterJDBCResource(String JavaDoc name) throws Exception JavaDoc;
104       
105     MEJBUtility getMEJBUtility();
106     
107     void unregisterAdminObjectResource(String JavaDoc name, String JavaDoc resourceType )
108         throws Exception JavaDoc;
109
110     void unregister(ObjectName JavaDoc objectName) throws Exception JavaDoc;
111     
112     Object JavaDoc getModuleUserData(String JavaDoc moduleID, int moduleType) throws Exception JavaDoc;
113     
114     void setModuleUserData(String JavaDoc moduleID, Object JavaDoc obj, int moduleType)throws Exception JavaDoc;
115
116     // api added for deploy objects
117

118     // Application
119

120     void createAppMBean(Application application, String JavaDoc serverName, String JavaDoc appLocation)
121             throws MBeanException;
122
123     void deleteAppMBean(Application application, String JavaDoc serverName)
124             throws MBeanException;
125
126     void createAppMBeanModules(Application application, String JavaDoc serverName, String JavaDoc appLocation)
127             throws MBeanException;
128
129     void createAppMBeans(Application application, String JavaDoc serverName, String JavaDoc appLocation)
130             throws MBeanException;
131
132     void deleteAppMBeans(Application application, String JavaDoc serverName)
133             throws MBeanException;
134
135
136     // Ejb Module
137

138     void createEJBModuleMBean(EjbBundleDescriptor ejbBundleDescriptor,
139     String JavaDoc serverName, String JavaDoc appLocation) throws MBeanException;
140
141     void deleteEJBModuleMBean(EjbBundleDescriptor ejbBundleDescriptor,
142     String JavaDoc serverName) throws MBeanException;
143
144     void createEJBMBeans(EjbBundleDescriptor ejbBundleDescriptor,
145     String JavaDoc serverName) throws MBeanException;
146
147     void deleteEJBMBeans(EjbBundleDescriptor ejbBundleDescriptor,
148     String JavaDoc serverName) throws MBeanException;
149
150     void createEJBMBean(EjbDescriptor ejbDescriptor,
151     String JavaDoc serverName) throws MBeanException;
152
153     void deleteEJBMBean(EjbDescriptor ejbDescriptor,
154     String JavaDoc serverName) throws MBeanException;
155
156
157
158     // Web Module
159
void createWebModuleMBean(String JavaDoc appName, String JavaDoc parentName,
160     String JavaDoc serverName, String JavaDoc deploymentDescriptor)
161     throws MBeanException;
162
163     void deleteWebModuleMBean(String JavaDoc appName, String JavaDoc parentName,
164     String JavaDoc serverName) throws MBeanException;
165
166     void createWebMBeans(WebBundleDescriptor webBundleDescriptor,
167     String JavaDoc serverName) throws MBeanException;
168
169     void deleteWebMBeans(WebBundleDescriptor webBundleDescriptor,
170     String JavaDoc serverName) throws MBeanException;
171
172     void createWebMBean(String JavaDoc servletName, String JavaDoc moduleName, String JavaDoc appName,
173     String JavaDoc serverName) throws MBeanException;
174
175     void deleteWebMBean(String JavaDoc servletName, String JavaDoc moduleName, String JavaDoc appName,
176     String JavaDoc serverName) throws MBeanException;
177
178     void registerWebModuleAndItsComponents(WebBundleDescriptor webBundleDescriptor,
179     String JavaDoc serverName, boolean registerComponents, String JavaDoc appLocation)
180     throws MBeanException;
181
182     // Web Service (monitoring) endpoints
183

184     /**
185      * Creates all the web service endpoint runtime mbeans for the web or
186      * ejb bundle.
187      *
188      * @param bundleDescriptor descriptor of the web/ejb bundle
189      * @param serverName instance on which these mbeans are created
190      *
191      * @throws MBeanException incase of error
192      */

193     void createWSEndpointMBeans(BundleDescriptor bundleDescriptor,
194     String JavaDoc serverName) throws MBeanException;
195
196     /**
197      * Deletes all the web service endpoint runtime mbeans for the web or
198      * ejb bundle.
199      *
200      * @param bundleDescriptor descriptor of the web/ejb bundle
201      * @param serverName instance on which these mbeans are deleted
202      *
203      * @throws MBeanException incase of error
204      */

205     void deleteWSEndpointMBeans(BundleDescriptor bundleDescriptor,
206     String JavaDoc serverName) throws MBeanException;
207
208     /**
209      * Creates the specified web service endpoint runtime mbean
210      *
211      * @param ctxRoot context root for this web service endpoint
212      * @param descriptor descriptor of the web service endpoint
213      * @param serverName instance on which these mbean is created
214      *
215      * @throws MBeanException incase of error
216      */

217     void createWSEndpointMBean(String JavaDoc ctxRoot, WebServiceEndpoint descriptor,
218     String JavaDoc serverName) throws MBeanException;
219
220     /**
221      * Deletes the specified web service endpoint runtime mbean
222      *
223      * @param ctxRoot context root for this web service endpoint
224      * @param descriptor descriptor of the web service endpoint
225      * @param serverName instance on which these mbean is deleted
226      *
227      * @throws MBeanException incase of error
228      */

229     void deleteWSEndpointMBean(String JavaDoc ctxRoot, WebServiceEndpoint descriptor,
230     String JavaDoc serverName) throws MBeanException;
231
232
233     // Connector Module
234

235     void createRARModuleMBean(ConnectorDescriptor bundleDesc,
236     String JavaDoc serverName, String JavaDoc appLocation) throws MBeanException;
237
238     void deleteRARModuleMBean(ConnectorDescriptor cd,
239     String JavaDoc serverName) throws MBeanException;
240
241     void createRARMBeans(ConnectorDescriptor cd,
242     String JavaDoc serverName) throws MBeanException;
243
244     void deleteRARMBeans(ConnectorDescriptor cd,
245     String JavaDoc serverName) throws MBeanException;
246      
247     void createRARMBean(ConnectorDescriptor cd,
248     String JavaDoc serverName) throws MBeanException;
249
250     void deleteRARMBean(ConnectorDescriptor cd,
251     String JavaDoc serverName) throws MBeanException;
252      
253     void registerResourceAdapterModuleAndItsComponents(ConnectorDescriptor bundleDesc,
254     String JavaDoc serverName, boolean registerComponents, String JavaDoc appLocation)
255     throws MBeanException;
256
257
258     // Application Client Module
259

260     void createAppClientModuleMBean(String JavaDoc appName, String JavaDoc parentName,
261     String JavaDoc serverName, String JavaDoc deploymentDescriptor) throws MBeanException;
262
263     void deleteAppClientModuleMBean(String JavaDoc appName, String JavaDoc parentName,
264     String JavaDoc serverName) throws MBeanException;
265
266     void registerAppClient(ApplicationClientDescriptor bundleDesc,
267     String JavaDoc serverName, String JavaDoc appLocation) throws MBeanException;
268   
269     void unregisterAppClient(ApplicationClientDescriptor bundleDesc,
270      String JavaDoc serverName) throws MBeanException;
271
272     // State Management
273

274     void setApplicationState(int state, Application application,
275     String JavaDoc serverName) throws MBeanException;
276
277     void setEJBModuleState(int state, EjbBundleDescriptor ejbBundleDescriptor,
278     String JavaDoc serverName) throws MBeanException;
279
280     void setRARModuleState(int state, ConnectorDescriptor connectorDescriptor,
281     String JavaDoc serverName) throws MBeanException;
282
283     Integer JavaDoc getState(String JavaDoc namePattern) throws MBeanException;
284
285     // Utility methods
286

287     String JavaDoc getModuleName(BundleDescriptor bd) throws MBeanException;
288     
289     String JavaDoc getApplicationName(BundleDescriptor bd);
290
291     ObjectName JavaDoc findObjectName(String JavaDoc namePattern) throws MBeanException;
292
293     String JavaDoc getJ2eeTypeForEjb(EjbDescriptor ejbDescriptor) throws MBeanException;
294
295     void registerTransactionService();
296
297     void registerAllJ2EEClusters();
298     void registerJ2EECluster(String JavaDoc clusterName);
299     void unregisterJ2EECluster(String JavaDoc clusterName);
300
301 }
302
Popular Tags