@Override
  public Object invoke(final String resourceName, final String operationName, final Object[] params,
      final String[] signatures) {
    final URI link = HttpRequester.createURI(baseUrl, "/mbean/operation");

    MultiValueMap<String, Object> content = new LinkedMultiValueMap<>();

    content.add("resourceName", resourceName);
    content.add("operationName", operationName);
    if (params != null) {
      for (Object param : params) {
        content.add("parameters", param);
      }
    }
    if (signatures != null) {
      for (String signature : signatures) {
        content.add("signature", signature);
      }
    }

    try {
      return IOUtils.deserializeObject(
          httpRequester.post(link, content, byte[].class));
    } catch (IOException e) {
      throw new MBeanAccessException(String.format(
          "De-serializing the result from invoking operation (%1$s) on MBean (%2$s) failed!",
          resourceName, operationName), e);
    } catch (ClassNotFoundException e) {
      throw new MBeanAccessException(String.format(
          "The Class type of the result from invoking operation (%1$s) on MBean (%2$s) was not found!",
          resourceName, operationName), e);
    }

  }
Invoke an operation identified by name on a remote resource identified by name with the given
arguments. The intent of this method is to invoke an arbitrary operation on an MBean located in
the remote MBeanServer.

@param resourceName name/url (object name) of the remote resource (MBea) on which operation is
       to be invoked.
@param operationName name of the operation to be invoked.
@param params an array of arguments for the parameters to be set when the operation is invoked.
@param signatures an array containing the signature of the operation.
@return result of the operation invocation.
@throws MBeanAccessException if an MBean access error occurs.
geode-gfsh/src/main/java/org/apache/geode/management/internal/web/shell/HttpOperationInvoker.java