jdk/src/share/classes/java/lang/management/PlatformComponent.java
changeset 4156 acaa49a2768a
parent 3066 cd3861104f4d
child 4172 bceea7bc12b7
equal deleted inserted replaced
4155:460e37d40f12 4156:acaa49a2768a
    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;