equal
deleted
inserted
replaced
38 |
38 |
39 import com.sun.management.HotSpotDiagnosticMXBean; |
39 import com.sun.management.HotSpotDiagnosticMXBean; |
40 import com.sun.management.UnixOperatingSystemMXBean; |
40 import com.sun.management.UnixOperatingSystemMXBean; |
41 |
41 |
42 import sun.management.ManagementFactoryHelper; |
42 import sun.management.ManagementFactoryHelper; |
|
43 import sun.management.Util; |
43 |
44 |
44 /** |
45 /** |
45 * This enum class defines the list of platform components |
46 * This enum class defines the list of platform components |
46 * that provides monitoring and management support. |
47 * that provides monitoring and management support. |
47 * Each enum represents one MXBean interface. A MXBean |
48 * Each enum represents one MXBean interface. A MXBean |
382 String domainAndType = domain + ":type=" + type; |
383 String domainAndType = domain + ":type=" + type; |
383 if (keyProperties.size() > 1) { |
384 if (keyProperties.size() > 1) { |
384 // if there are more than 1 key properties (i.e. other than "type") |
385 // if there are more than 1 key properties (i.e. other than "type") |
385 domainAndType += ",*"; |
386 domainAndType += ",*"; |
386 } |
387 } |
387 ObjectName on = ObjectName.valueOf(domainAndType); |
388 ObjectName on = Util.newObjectName(domainAndType); |
388 Set<ObjectName> set = mbs.queryNames(on, null); |
389 Set<ObjectName> set = mbs.queryNames(on, null); |
389 for (PlatformComponent pc : subComponents) { |
390 for (PlatformComponent pc : subComponents) { |
390 set.addAll(pc.getObjectNames(mbs)); |
391 set.addAll(pc.getObjectNames(mbs)); |
391 } |
392 } |
392 return set; |
393 return set; |