KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > celtix > bus > management > jmx > JMXUtils


1 package org.objectweb.celtix.bus.management.jmx;
2
3 import java.util.logging.Level JavaDoc;
4 import java.util.logging.Logger JavaDoc;
5
6 import javax.management.ObjectName JavaDoc;
7
8 import org.objectweb.celtix.common.logging.LogUtils;
9
10
11 public final class JMXUtils {
12     
13     public static final String JavaDoc DOMAIN_STRING = "org.objectweb.celtix.instrumentation";
14     
15     private static final Logger JavaDoc LOG = LogUtils.getL7dLogger(JMXUtils.class);
16     private JMXUtils() {
17     }
18          
19     /**
20      * Bus :
21            org.objectweb.celtix.instrumentation:type=Bus,name=celtix
22        
23        WorkQueue :
24            org.objectweb.celtix.instrumentation:type=Bus.WorkQueue,Bus=celtix,name=WorkQueue
25         
26        WSDLManager :
27            org.objectweb.celtix.instrumentation:type=Bus.WSDLManager,Bus=celtix,name=WSDLManager
28            
29          
30        Endpoint :
31            org.objectweb.celtix.instrumentation:type=Bus.Endpoint,Bus=celtix,
32            Bus.Service={http://objectweb.org/hello_world}SOAPService",Bus.Port=SoapPort,
33            name=Endpoint
34         
35        HTTPServerTransport:
36            org.objectweb.celtix.instrumentation:type=Bus.Service.Port.HTTPServerTransport,
37            Bus=celtix,Bus.Service={http://objectweb.org/hello_world}SOAPService",Bus.Port=SoapPort,
38            name=HTTPServerTransport"
39        
40        JMSServerTransport:
41            org.objectweb.celtix.instrumentation:type=Bus.Service.Port.JMSServerTransport,
42            Bus=celtix,Bus.Service={http://objectweb.org/hello_world}SOAPService",Bus.Port=SoapPort,
43            name=JMSServerTransport"
44        ...
45            
46      */

47     // org.objectweb.celtix:type=Componnet,name=QuotedQName,bus=busIdentifier
48
public static ObjectName JavaDoc getObjectName(String JavaDoc type, String JavaDoc name, String JavaDoc busID) {
49         String JavaDoc objectName = "";
50         if (type.compareTo("Bus") == 0) {
51             objectName = ":type=" + type + ",name=" + busID;
52         } else {
53             objectName = ":type=" + type + ",Bus=" + busID + name;
54         }
55         try {
56             return new ObjectName JavaDoc(DOMAIN_STRING + objectName);
57         } catch (Exception JavaDoc ex) {
58             LOG.log(Level.SEVERE, "OBJECT_NAME_FALUE_MSG", new Object JavaDoc[]{name, ex});
59         }
60         return null;
61     }
62
63    
64
65 }
66
Popular Tags