Example #1
0
  /**
   * Constructor used for {@link HttpMethod#POST} requests, which receive a JSON payload.
   *
   * @param pMap map containing requests parameters
   * @param pInitParams optional processing parameters (obtained as query parameters or from within
   *     the JSON request)
   */
  public JmxRequest(Map<String, ?> pMap, ProcessingParameters pInitParams) {
    this(
        RequestType.getTypeByName((String) pMap.get("type")),
        HttpMethod.POST,
        EscapeUtil.parsePath((String) pMap.get("path")),
        pInitParams);

    Map target = (Map) pMap.get("target");
    if (target != null) {
      targetConfig = new ProxyTargetConfig(target);
    }
  }