@RequestMapping(method = RequestMethod.POST, value = "/mbean/operation")
  public ResponseEntity<?> invoke(@RequestParam("resourceName") final String resourceName,
      @RequestParam("operationName") final String operationName,
      @RequestParam(value = "signature", required = false) String[] signature,
      @RequestParam(value = "parameters", required = false) Object[] parameters)
      throws MalformedObjectNameException, MBeanException, InstanceNotFoundException,
      ReflectionException, IOException {
    // Exceptions are caught by the @ExceptionHandler AbstractCommandsController.handleAppException
    signature = (signature != null ? signature : ArrayUtils.EMPTY_STRING_ARRAY);
    parameters = (parameters != null ? parameters : ArrayUtils.EMPTY_OBJECT_ARRAY);
    MBeanServer mBeanServer = getMBeanServer();
    ObjectName objectName = ObjectName.getInstance(decode(resourceName));
    // GEODE-6182
    for (int i = 0; i < signature.length; i++) {
      parameters[i] = GeodeConverter.convertToActualType(parameters[i].toString(), signature[i]);
    }

    final Object result =
        mBeanServer.invoke(objectName, decode(operationName), parameters, signature);
    byte[] serializedResult = IOUtils.serializeObject(result);
    return new ResponseEntity<>(serializedResult, HttpStatus.OK);
  }
The ShellCommandsController class implements GemFire REST API calls for Gfsh Shell Commands.

@see org.springframework.stereotype.Controller
@see org.springframework.web.bind.annotation.RequestBody
@see org.springframework.web.bind.annotation.RequestMapping
@see org.springframework.web.bind.annotation.RequestMethod
@see org.springframework.web.bind.annotation.RequestParam
@see org.springframework.web.bind.annotation.ResponseBody
@since GemFire 8.0
geode-web/src/main/java/org/apache/geode/management/internal/web/controllers/ShellCommandsController.java