@Override
  @SuppressWarnings("unchecked")
  public Set<ObjectName> queryNames(final ObjectName objectName, final QueryExp queryExpression) {
    final URI link = HttpRequester.createURI(baseUrl, "/mbean/query");

    Object content = new QueryParameterSource(objectName, queryExpression);
    try {
      return (Set<ObjectName>) IOUtils
          .deserializeObject(httpRequester.post(link, content, byte[].class));
    } catch (Exception e) {
      throw new MBeanAccessException(String.format(
          "An error occurred while querying for MBean names using ObjectName pattern (%1$s) and Query expression (%2$s)!",
          objectName, queryExpression), e);
    }
  }
This method searches the MBean server, based on the OperationsInvoker's JMX-based or remoting
capable MBean server connection, for MBeans matching a specific ObjectName or matching an
ObjectName pattern along with satisfying criteria from the Query expression.

@param objectName the ObjectName or pattern for which matching MBeans in the target MBean
       server will be returned.
@param queryExpression the JMX-based query expression used to filter matching MBeans.
@return a set of ObjectName's matching MBeans in the MBean server matching the ObjectName and
        Query expression criteria.
geode-gfsh/src/main/java/org/apache/geode/management/internal/web/shell/HttpOperationInvoker.java