code: protected String getSingleStringAttribute(MBeanServerExecutor pMBeanServerExecutor, String pMBeanName, String pAttribute) {
          Set<ObjectName> serverMBeanNames = searchMBeans(pMBeanServerExecutor, pMBeanName);
          if (serverMBeanNames.size() == 0) {
              return null;
          }
          Set<String> attributeValues = new HashSet<String>();
          for (ObjectName oName : serverMBeanNames) {
              String val = getAttributeValue(pMBeanServerExecutor, oName, pAttribute);
              if (val != null) {
                  attributeValues.add(val);
              }
          }
          if (attributeValues.size() == 0 || attributeValues.size() > 1) {
              return null;
          }
          return attributeValues.iterator().next();
      }
docs: Get a single attribute for a given MBeanName pattern.
  
  @param pMBeanServerExecutor MBeanServer manager to query
  @param pMBeanName a MBean name or pattern. If multiple MBeans are found, each is queried for the attribute
  @param pAttribute the attribute to lookup
  @return the string value of the attribute or null if either no MBeans could be found, or 0 or more than 1 attribute
  are found on those mbeans