Exemplo n.º 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);
    }
  }
Exemplo n.º 2
0
 /**
  * Get the path combined with proper escaping
  *
  * @return path as string or null if no path is given.
  */
 public String getPath() {
   return EscapeUtil.combineToPath(pathParts);
 }