/** * Instantiates a new JSON request. * * @param method * the method * @param params * the params */ public JSONRequest(final String method, final ObjectNode params) { init(null, method, params, null); }
/** * Instantiates a new jSON request. */ public JSONRequest() { init(null, null, null, null); }
/** * Instantiates a new JSON request. * * @param request * the request */ public JSONRequest(final JsonNode request) { init(request); }
/** * Instantiates a new JSON request. * * @param method * the method * @param params * the params * @param callback * the callback */ public <T> JSONRequest(final String method, final ObjectNode params, final AsyncCallback<T> callback) { if (callback != null) { } init(null, method, params, callback); }
/** * Instantiates a new jSON request. * * @param id * the id * @param method * the method * @param params * the params * @param callback * the callback */ public <T> JSONRequest(final JsonNode id, final String method, final ObjectNode params, final AsyncCallback<T> callback) { init(id, method, params, callback); }
/** * Instantiates a new JSON request. * * @param json * the json * @throws IOException * Signals that an I/O exception has occurred. */ public JSONRequest(final String json) throws IOException { final ObjectMapper mapper = JOM.getInstance(); init(mapper.readTree(json)); }
init(request.get(ID), request.get(METHOD).asText(), (ObjectNode) request.get(PARAMS), null);
LOG.log(Level.SEVERE, "Failed to generate UUID for request", e); init(id, method.getName(), params, callback);