KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > jonas > jmx > JonasObjectName


1 /**
2  * JOnAS: Java(TM) Open Application Server
3  * Copyright (C) 1999-2005 Bull S.A.
4  * Contact: jonas-team@objectweb.org
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
19  * USA
20  *
21  * --------------------------------------------------------------------------
22  * $Id: JonasObjectName.java,v 1.39 2005/07/25 22:49:52 vivekl Exp $
23  * --------------------------------------------------------------------------
24  */

25
26 package org.objectweb.jonas.jmx;
27
28 import javax.management.MalformedObjectNameException JavaDoc;
29 import javax.management.ObjectName JavaDoc;
30
31 /**
32  * A set of static classes used to build the names of proprietary MBeans used in JOnAS and in Joram.
33  * @author Bruno Michel
34  * @author Guillaume Riviere
35  * @author Florent Benoit
36  * @author Ludovic Bert
37  * @author Miroslav Halas
38  * @author Adriana Danes
39  */

40 public class JonasObjectName {
41
42     /**
43      * domain name
44      */

45     private static String JavaDoc domain = null;
46
47
48     /**
49      * Set the domain used by JOnAS server
50      * @param domainName the domain to use
51      */

52     public static void setDomain(String JavaDoc domainName) {
53         if (domain != null) {
54             throw new IllegalStateException JavaDoc("The setDomain method can be called only once.");
55         }
56         domain = domainName;
57     }
58
59     /**
60      * @return the domain name of the JOnAS server.
61      */

62     private static String JavaDoc getDomain() {
63         if (domain == null) {
64             throw new IllegalStateException JavaDoc("The domain was not previously set, cannot return it.");
65         }
66         return domain;
67     }
68
69     /**
70      * Create ObjectName for the JMX Connector Server which is an MBean inside the target MBeanServer
71      * @param protocol used protocol
72      * @param connectorName name used to distinguish connector servers using the same protocol
73      * @return ObjectName for the JMX Connector Server MBean
74      */

75     public static ObjectName JavaDoc jmxConnectorServer(String JavaDoc protocol, String JavaDoc connectorName) {
76         try {
77             return ObjectName.getInstance("connectors:protocol=" + protocol + ",name=" + connectorName);
78         } catch (MalformedObjectNameException JavaDoc e) {
79             // this should never occur
80
return null;
81         }
82     }
83
84     /**
85      * @return ObjectName for reconfiguration manager MBean
86      */

87     public static ObjectName JavaDoc serverConfig() {
88         try {
89             return ObjectName.getInstance(getDomain() + ":type=management,name=reconfigManager");
90         } catch (MalformedObjectNameException JavaDoc e) {
91             // this should never occur
92
return null;
93         }
94     }
95
96     public static ObjectName JavaDoc wwwService() {
97         try {
98             return ObjectName.getInstance(getDomain() + ":type=webContainer,name=Jetty");
99         } catch (MalformedObjectNameException JavaDoc e) {
100             // this should never occur
101
return null;
102         }
103     }
104
105     public static ObjectName JavaDoc wsService(){
106         //TODO: Add a proper web service mbean instead.
107
try {
108             return ObjectName.getInstance(getDomain() + ":type=WebService,*");
109         } catch (MalformedObjectNameException JavaDoc e) {
110             // this should never occur
111
return null;
112         }
113     }
114
115     public static ObjectName JavaDoc ejbService() {
116         try {
117             return ObjectName.getInstance(getDomain() + ":type=service,name=ejbContainers");
118         } catch (MalformedObjectNameException JavaDoc e) {
119             // this should never occur
120
return null;
121         }
122     }
123
124     /**
125      * Return the earService (Jmx).
126      * @return the Ear service.
127      */

128     public static ObjectName JavaDoc earService() {
129         try {
130             return ObjectName.getInstance(getDomain() + ":type=service,name=ear");
131         } catch (MalformedObjectNameException JavaDoc e) {
132             // this should never occur
133
return null;
134         }
135     }
136
137     /**
138      * Return the mailService (Jmx).
139      * @return the Mail service.
140      */

141     public static ObjectName JavaDoc mailService() {
142         try {
143             return ObjectName.getInstance(getDomain() + ":type=service,name=mail");
144         } catch (MalformedObjectNameException JavaDoc e) {
145             // this should never occur
146
return null;
147         }
148     }
149
150     /**
151      * Return the webContainerService (Jmx).
152      * @return the web container service.
153      */

154     public static ObjectName JavaDoc webContainerService() {
155         try {
156             return ObjectName.getInstance(getDomain() + ":type=service,name=webContainers");
157         } catch (MalformedObjectNameException JavaDoc e) {
158             // this should never occur
159
return null;
160         }
161     }
162
163     public static ObjectName JavaDoc databaseService() {
164         try {
165             return ObjectName.getInstance(getDomain() + ":type=service,name=database");
166         } catch (MalformedObjectNameException JavaDoc e) {
167             // this should never occur
168
return null;
169         }
170     }
171
172     public static ObjectName JavaDoc resourceService() {
173         try {
174             return ObjectName.getInstance(getDomain() + ":type=service,name=resource");
175         } catch (MalformedObjectNameException JavaDoc e) {
176             // this should never occur
177
return null;
178         }
179     }
180
181     public static ObjectName JavaDoc transactionService() {
182         try {
183             return ObjectName.getInstance(getDomain() + ":type=service,name=jtm");
184         } catch (MalformedObjectNameException JavaDoc e) {
185             // this should never occur
186
return null;
187         }
188     }
189
190     public static ObjectName JavaDoc logService(String JavaDoc filename) {
191         try {
192             return ObjectName.getInstance(getDomain() + ":type=service,name=log,fname="
193                 + fileNameForObjectName(filename));
194         } catch (MalformedObjectNameException JavaDoc e) {
195             // this should never occur
196
return null;
197         }
198     }
199     /**
200      * Construct ObjectName for the discovery service MBean
201      * @return ObjectName for the discovery service MBean
202      */

203     public static ObjectName JavaDoc discoveryService() {
204         try {
205             return ObjectName.getInstance(getDomain() + ":type=service,name=discovery");
206         } catch (MalformedObjectNameException JavaDoc e) {
207             // this should never occur
208
return null;
209         }
210     }
211
212     public static ObjectName JavaDoc allLogServices() {
213         try {
214             return ObjectName.getInstance(getDomain() + ":type=service,name=log,*");
215         } catch (MalformedObjectNameException JavaDoc e) {
216             // this should never occur
217
return null;
218         }
219     }
220
221     public static ObjectName JavaDoc allServices() {
222         try {
223             return ObjectName.getInstance(getDomain() + ":type=service,*");
224         } catch (MalformedObjectNameException JavaDoc e) {
225             // this should never occur
226
return null;
227         }
228     }
229
230     public static ObjectName JavaDoc jmsService() {
231         try {
232             return ObjectName.getInstance(getDomain() + ":type=service,name=jms");
233         } catch (MalformedObjectNameException JavaDoc e) {
234             // this should never occur
235
return null;
236         }
237     }
238
239     public static ObjectName JavaDoc jmsService1() {
240         try {
241             return ObjectName.getInstance(getDomain() + ":type=service,name=jms");
242         } catch (MalformedObjectNameException JavaDoc e) {
243             // this should never occur
244
return null;
245         }
246     }
247
248     public static ObjectName JavaDoc securityService() {
249         try {
250             return ObjectName.getInstance(getDomain() + ":type=service,name=security");
251         } catch (MalformedObjectNameException JavaDoc e) {
252             // this should never occur
253
return null;
254         }
255     }
256
257     public static ObjectName JavaDoc jmxService() {
258         try {
259             return ObjectName.getInstance("JMImplementation:type=MBeanServerDelegate");
260         } catch (MalformedObjectNameException JavaDoc e) {
261             // this should never occur
262
return null;
263         }
264     }
265
266     public static ObjectName JavaDoc www(String JavaDoc subtype)
267         throws MalformedObjectNameException JavaDoc {
268         return ObjectName.getInstance(getDomain() + ":type=www,subtype=" + subtype);
269     }
270
271     public static ObjectName JavaDoc rar(String JavaDoc filename)
272         throws MalformedObjectNameException JavaDoc {
273         return ObjectName.getInstance(getDomain() + ":type=resource,fname=" + fileNameForObjectName(filename));
274     }
275
276     public static ObjectName JavaDoc war(String JavaDoc filename)
277         throws MalformedObjectNameException JavaDoc {
278         return ObjectName.getInstance(getDomain() + ":type=war,fname=" + fileNameForObjectName(filename));
279     }
280
281     public static ObjectName JavaDoc datasource(String JavaDoc name)
282         throws MalformedObjectNameException JavaDoc {
283         return ObjectName.getInstance(getDomain() + ":type=datasource,name=" + name);
284     }
285
286     /**
287      * Return an objectName for a Session type mail factory.
288      * @param name the name of the mail factory
289      * @return an objectName for the mail factory.
290      * @throws MalformedObjectNameException if the objectname can't be build
291      */

292     public static ObjectName JavaDoc sessionMailFactory(String JavaDoc name)
293         throws MalformedObjectNameException JavaDoc {
294         return ObjectName.getInstance(getDomain() + ":type=sessionmailfactory,name=" + name);
295     }
296
297     /**
298      * Return an objectName for the WorkManager
299      * @return an objectName for the WorkManager
300      * @throws MalformedObjectNameException if the objectname can't be build
301      */

302     public static ObjectName JavaDoc workManager()
303         throws MalformedObjectNameException JavaDoc {
304         return ObjectName.getInstance(getDomain() + ":type=workmanager");
305     }
306
307     /**
308      * Return an objectName for a MimePartDataSource type mail factory.
309      * @param name the name of the mail factory
310      * @return an objectName for the mail factory.
311      * @throws MalformedObjectNameException if the objectname can't be build
312      */

313     public static ObjectName JavaDoc mimeMailFactory(String JavaDoc name)
314         throws MalformedObjectNameException JavaDoc {
315         return ObjectName.getInstance(getDomain() + ":type=mimemailfactory,name=" + name);
316     }
317
318     /**
319      * Return an objectName for a Security memory factory.
320      * @param name the name of the security memory factory
321      * @return an objectName for the security memory factory.
322      * @throws MalformedObjectNameException if the objectname can't be build
323      */

324     public static ObjectName JavaDoc securityMemoryFactory(String JavaDoc name)
325         throws MalformedObjectNameException JavaDoc {
326         return ObjectName.getInstance(getDomain() + ":type=securityfactory,subtype=memory,name=" + name);
327     }
328
329     /**
330      * Return an objectName for a Security datasource factory.
331      * @param name the name of the security datasource factory
332      * @return an objectName for the security datasource factory.
333      * @throws MalformedObjectNameException if the objectname can't be build
334      */

335     public static ObjectName JavaDoc securityDatasourceFactory(String JavaDoc name)
336         throws MalformedObjectNameException JavaDoc {
337         return ObjectName.getInstance(getDomain() + ":type=securityfactory,subtype=datasource,name=" + name);
338     }
339
340     /**
341      * Return an objectName for a Security ldap factory.
342      * @param name the name of the security ldap factory
343      * @return an objectName for the security ldap factory.
344      * @throws MalformedObjectNameException if the objectname can't be build
345      */

346     public static ObjectName JavaDoc securityLdapFactory(String JavaDoc name)
347         throws MalformedObjectNameException JavaDoc {
348         return ObjectName.getInstance(getDomain() + ":type=securityfactory,subtype=ldap,name=" + name);
349     }
350
351     /**
352      * Return an objectName for a user
353      * @param resource the name of the resource on which the user depends
354      * @param username the name of the user
355      * @return an objectName for the user MBean
356      * @throws MalformedObjectNameException if the objectname can't be build
357      */

358     public static ObjectName JavaDoc user(String JavaDoc resource, String JavaDoc username)
359         throws MalformedObjectNameException JavaDoc {
360         return ObjectName.getInstance(getDomain() + ":type=security,subtype=users,resource=" + resource
361             + ",name=" + username);
362     }
363
364     /**
365      * Return an objectName for all the users
366      * @return an objectName for all the users
367      * @throws MalformedObjectNameException if the objectname can't be build
368      */

369     public static ObjectName JavaDoc allUsers() {
370         try {
371             return ObjectName.getInstance(getDomain() + ":type=security,subtype=users,*");
372         }
373         catch (MalformedObjectNameException JavaDoc e) {
374             // this should never occur
375
return null;
376         }
377     }
378
379     /**
380      * Return an objectName for a group
381      * @param resource the name of the resource on which the group depends
382      * @param groupname the name of the group
383      * @return an objectName for the group MBean
384      * @throws MalformedObjectNameException if the objectname can't be build
385      */

386     public static ObjectName JavaDoc group(String JavaDoc resource, String JavaDoc groupname)
387         throws MalformedObjectNameException JavaDoc {
388         return ObjectName.getInstance(getDomain() + ":type=security,subtype=groups,resource=" + resource
389             + ",name=" + groupname);
390     }
391
392     /**
393      * Return an objectName for all the groups
394      * @return an objectName for all the groups
395      * @throws MalformedObjectNameException if the objectname can't be build
396      */

397     public static ObjectName JavaDoc allGroups() {
398         try {
399             return ObjectName.getInstance(getDomain() + ":type=security,subtype=groups,*");
400         }
401         catch (MalformedObjectNameException JavaDoc e) {
402             // this should never occur
403
return null;
404         }
405     }
406
407     /**
408      * Return an objectName for a role
409      * @param resource the name of the resource on which the role depends
410      * @param rolename the name of the role
411      * @return an objectName for the user MBean
412      * @throws MalformedObjectNameException if the objectname can't be build
413      */

414     public static ObjectName JavaDoc role(String JavaDoc resource, String JavaDoc rolename)
415         throws MalformedObjectNameException JavaDoc {
416         return ObjectName.getInstance(getDomain() + ":type=security,subtype=roles,resource=" + resource
417             + ",name=" + rolename);
418     }
419
420     /**
421      * Return an objectName for all the roles
422      * @return an objectName for all the roles
423      * @throws MalformedObjectNameException if the objectname can't be build
424      */

425     public static ObjectName JavaDoc allRoles() {
426         try {
427             return ObjectName.getInstance(getDomain() + ":type=security,subtype=roles,*");
428         }
429         catch (MalformedObjectNameException JavaDoc e) {
430             // this should never occur
431
return null;
432         }
433     }
434
435     public static ObjectName JavaDoc resourceAdapters()
436         throws MalformedObjectNameException JavaDoc {
437         return ObjectName.getInstance(getDomain() + ":type=resourceadapter,*");
438     }
439
440     public static ObjectName JavaDoc resourceAdapter(String JavaDoc name)
441         throws MalformedObjectNameException JavaDoc {
442         return ObjectName.getInstance(getDomain() + ":type=resourceadapter,name=" + name);
443     }
444
445     public static ObjectName JavaDoc rmiConnector() {
446         try {
447             return ObjectName.getInstance(getDomain() + ":type=connector,name=rmiconnector");
448         }
449         catch (MalformedObjectNameException JavaDoc e) {
450             // this should never occur
451
return null;
452         }
453     }
454
455     public static ObjectName JavaDoc allWWW() {
456         try {
457             return ObjectName.getInstance(getDomain() + ":type=service,name=www,*");
458         }
459         catch (MalformedObjectNameException JavaDoc e) {
460             // this should never occur
461
return null;
462         }
463     }
464
465     public static ObjectName JavaDoc allEars() {
466         try {
467             return ObjectName.getInstance(getDomain() + ":type=ear,*");
468         }
469         catch (MalformedObjectNameException JavaDoc e) {
470             // this should never occur
471
return null;
472         }
473     }
474
475     public static ObjectName JavaDoc allRars() {
476         try {
477             return ObjectName.getInstance(getDomain() + ":type=resource,*");
478         } catch (MalformedObjectNameException JavaDoc e) {
479             // this should never occur
480
return null;
481         }
482     }
483
484     public static ObjectName JavaDoc allWars() {
485         try {
486             return ObjectName.getInstance(getDomain() + ":type=war,*");
487         } catch (MalformedObjectNameException JavaDoc e) {
488             // this should never occur
489
return null;
490         }
491     }
492
493     public static ObjectName JavaDoc allDatasources() {
494         try {
495             return ObjectName.getInstance(getDomain() + ":type=datasource,*");
496         } catch (MalformedObjectNameException JavaDoc e) {
497             // this should never occur
498
return null;
499         }
500     }
501
502     /**
503      * Return an objectName specifying all the session mail factories.
504      * @return an objectName referencing all session mail factories.
505      */

506     public static ObjectName JavaDoc allSessionMailFactories() {
507         try {
508             return ObjectName.getInstance(getDomain() + ":type=sessionmailfactory,*");
509         } catch (MalformedObjectNameException JavaDoc e) {
510             // this should never occur
511
return null;
512         }
513     }
514
515     /**
516      * Return an objectName specifying all the mime mail factories.
517      * @return an objectName referencing all mime mail factories.
518      */

519     public static ObjectName JavaDoc allMimeMailFactories() {
520         try {
521             return ObjectName.getInstance(getDomain() + ":type=mimemailfactory,*");
522         } catch (MalformedObjectNameException JavaDoc e) {
523             // this should never occur
524
return null;
525         }
526     }
527
528     public static ObjectName JavaDoc allResourceAdaptors() {
529         try {
530             return ObjectName.getInstance(getDomain() + ":type=resourceadapter,*");
531         } catch (MalformedObjectNameException JavaDoc e) {
532             // this should never occur
533
return null;
534         }
535     }
536
537     public static String JavaDoc getType(ObjectName JavaDoc obj) {
538         return obj.getKeyProperty("type");
539     }
540
541     public static String JavaDoc fileNameForObjectName(String JavaDoc fileName) {
542         return fileName.replace(':', '|');
543     }
544
545     /**
546      * Return an objectName for the Security factory name.
547      *
548      * @param pName The name of the wanted security factory
549      * @return an objectName for the security factory name.
550      * @throws MalformedObjectNameException if the objectname can't be build
551      */

552     public static ObjectName JavaDoc securityFactories(String JavaDoc pName)
553         throws MalformedObjectNameException JavaDoc {
554         return ObjectName.getInstance(JonasObjectName.getDomain() + ":type=securityfactory,name=" + pName);
555     }
556
557     /**
558      * Return an objectName for the Security factory name.
559      *
560      * @return an objectName for the security factory name.
561      * @throws MalformedObjectNameException if the objectname can't be build
562      */

563     public static ObjectName JavaDoc allSecurityFactories()
564         throws MalformedObjectNameException JavaDoc {
565         return ObjectName.getInstance(JonasObjectName.getDomain() + ":type=securityfactory,*");
566     }
567
568     /**
569      * Return an objectName for all the Security memory factories.
570      *
571      * @return an objectName for all the security memory factories
572      * @throws MalformedObjectNameException if the objectname can't be build
573      */

574     public static ObjectName JavaDoc allSecurityMemoryFactories()
575         throws MalformedObjectNameException JavaDoc {
576         return ObjectName.getInstance(JonasObjectName.getDomain() + ":type=securityfactory,subtype=memory,*");
577     }
578
579     /**
580      * Return an objectName for all the Security datasource factories.
581      *
582      * @return an objectName for all the security datasource factories
583      * @throws MalformedObjectNameException if the objectname can't be build
584      */

585     public static ObjectName JavaDoc allSecurityDatasourceFactories()
586         throws MalformedObjectNameException JavaDoc {
587         return ObjectName.getInstance(JonasObjectName.getDomain() + ":type=securityfactory,subtype=datasource,*");
588     }
589
590     /**
591      * Return an objectName for all the Security ldap factories.
592      *
593      * @return an objectName for all the security ldap factories
594      * @throws MalformedObjectNameException if the objectname can't be build
595      */

596     public static ObjectName JavaDoc allSecurityLdapFactories()
597         throws MalformedObjectNameException JavaDoc {
598         return ObjectName.getInstance(JonasObjectName.getDomain() + ":type=securityfactory,subtype=ldap,*");
599     }
600
601     /**
602      * Return an objectName for all users in a resource.
603      *
604      * @param pResource the name of the resource on which the user depends
605      * @return an objectName for the user MBean
606      * @throws MalformedObjectNameException if the objectname can't be build
607      */

608     public static ObjectName JavaDoc allUsers(String JavaDoc pResource)
609         throws MalformedObjectNameException JavaDoc {
610         return ObjectName.getInstance(JonasObjectName.getDomain() + ":type=security,subtype=users,resource="
611             + pResource + ",*");
612     }
613
614     /**
615      * Return an objectName for all roles in a resource.
616      *
617      * @param pResource the name of the resource on which the role depends
618      * @return an objectName for the user MBean
619      * @throws MalformedObjectNameException if the objectname can't be build
620      */

621     public static ObjectName JavaDoc allRoles(String JavaDoc pResource)
622         throws MalformedObjectNameException JavaDoc {
623         return ObjectName.getInstance(JonasObjectName.getDomain() + ":type=security,subtype=roles,resource="
624             + pResource + ",*");
625     }
626
627     /**
628      * Return an objectName for all groups in a resource.
629      *
630      * @param pResource the name of the resource on which the group depends
631      * @return an objectName for the user MBean
632      * @throws MalformedObjectNameException if the objectname can't be build
633      */

634     public static ObjectName JavaDoc allGroups(String JavaDoc pResource)
635         throws MalformedObjectNameException JavaDoc {
636         return ObjectName.getInstance(JonasObjectName.getDomain() + ":type=security,subtype=groups,resource="
637             + pResource + ",*");
638     }
639
640     /**
641      * A different implementation should allow returning a logical name.
642      * This String is used within the Exception messages when throwing a ManagementException.
643          * This is done currently in the invoke method of ManagementReprImpl/Mx4jManagementReprImpl classes.
644      * @return String representation of the ObjectName
645      */

646     public String JavaDoc toString() {
647         return super.toString();
648     }
649
650     // Joram integration
651
// ------------------
652
/**
653      * @return ObjectName for the local Joram server
654      * @exception MalformedObjectNameException Could not create ObjectName with the given String
655      */

656     public static ObjectName JavaDoc joramLocalServer() throws MalformedObjectNameException JavaDoc {
657         return ObjectName.getInstance("joram:type=JMSlocalServer");
658     }
659
660     /**
661      * Create ObjectName for a remote Joram server
662      * @param id remote server identifier
663      * @return ObjectName for a remote Joram server
664      * @exception MalformedObjectNameException Could not create ObjectName with the given String
665      */

666     public static ObjectName JavaDoc joramRemoteServer(String JavaDoc id) throws MalformedObjectNameException JavaDoc {
667         return ObjectName.getInstance("joram:type=JMSremoteServer,id=" + id);
668     }
669
670     /**
671      * Create ObjectName for a Joram managed queue
672      * @param name queue name
673      * @return ObjectName for a Joram managed queue
674      * @exception MalformedObjectNameException Could not create ObjectName with the given String
675      */

676     public static ObjectName JavaDoc joramQueue(String JavaDoc name) throws MalformedObjectNameException JavaDoc {
677         return ObjectName.getInstance("joram:type=JMSqueue,name=" + name);
678     }
679
680     /**
681      * Create ObjectName for a Joram managed topic
682      * @param name topic name
683      * @return ObjectName for a Joram managed topic
684      * @exception MalformedObjectNameException Could not create ObjectName with the given String
685      */

686     public static ObjectName JavaDoc joramTopic(String JavaDoc name) throws MalformedObjectNameException JavaDoc {
687         return ObjectName.getInstance("joram:type=JMStopic,name=" + name);
688     }
689
690     /**
691      * @return ObjectName for discovery manager MBean
692      * @exception MalformedObjectNameException Could not create ObjectName with the given String
693      */

694     public static ObjectName JavaDoc discoveryManager() throws MalformedObjectNameException JavaDoc {
695         return ObjectName.getInstance(getDomain() + ":type=management,name=discoveryManager,server=JOnAS");
696     }
697
698     /**
699      * @return ObjectName for discovery client MBean
700      * @exception MalformedObjectNameException Could not create ObjectName with the given String
701      */

702     public static ObjectName JavaDoc discoveryClient() throws MalformedObjectNameException JavaDoc {
703         return ObjectName.getInstance(getDomain() + ":type=management,name=discoveryClient,server=JOnAS");
704     }
705     /**
706      * @return ObjectName for discovery enroller MBean
707      * @exception MalformedObjectNameException Could not create ObjectName with the given String
708      */

709     public static ObjectName JavaDoc discoveryEnroller() throws MalformedObjectNameException JavaDoc {
710         return ObjectName.getInstance(getDomain() + ":type=management,name=discoveryEnroller,server=JOnAS");
711     }
712
713     /**
714      * @return ObjectName for Catalina Connectors Factory
715      * @exception MalformedObjectNameException Could not create ObjectName with the given String
716      * @param pDomain domain name
717      */

718     public static ObjectName JavaDoc catalinaConnectorFactory(String JavaDoc pDomain) throws MalformedObjectNameException JavaDoc {
719         return new ObjectName JavaDoc(pDomain + ":type=ConnectorFactory");
720     }
721
722     /**
723      * @return ObjectName for WebModule Proxy
724      * @exception MalformedObjectNameException Could not create ObjectName with the given String
725      * @param pDomain domain name
726      */

727     public static ObjectName JavaDoc webModuleProxy(String JavaDoc pDomain) throws MalformedObjectNameException JavaDoc {
728         return new ObjectName JavaDoc(pDomain + ":type=WebModuleProxy");
729     }
730 }
731
Popular Tags