Example #1
0
 public String getTargetConfigUrl() {
   if (targetConfig == null) {
     return null;
   } else {
     return targetConfig.getUrl();
   }
 }
Example #2
0
  /**
   * Return this request in a proper JSON representation
   *
   * @return this object in a JSON representation
   */
  public JSONObject toJSON() {
    JSONObject ret = new JSONObject();
    ret.put("type", type.name);
    if (objectName != null) {
      ret.put("mbean", objectName.getCanonicalName());
    }
    addAttributesAsJson(ret);
    addExtraArgsAsJson(ret);
    if (value != null) {
      ret.put("value", value);
    }
    if (operation != null) {
      ret.put("operation", operation);
    }

    if (targetConfig != null) {
      ret.put("target", targetConfig.toJSON());
    }
    return ret;
  }