code: public Set queryNames(final ObjectName name,
                          final QueryExp query) throws Exception{
      return getMBeanServer().queryNames(name, query);
    }
docs: Gets the names of MBeans controlled by the MBean server. This method enables any of the
  following to be obtained: <ul>
  <li>The names of all MBeans, </li>
  <li>the names of a set of MBeans specified by pattern matching on the ObjectName and/or a Query expression, </li>
  <li>a specific MBean name (equivalent to testing whether an MBean is registered).</li>
  </ul>
  
  <p> When the object name is null or no domain and key properties are specified,
  all objects are selected (and filtered if a query is specified). It returns the set of
  ObjectNames for the MBeans selected.
  
  @param name
  @param query
  @return A set containing the ObjectNames for the MBeans selected. If no MBean
  satisfies the query, an empty list is returned.
  @throws Exception