public CallMessage(long id, String method, String param) { this(method, param); setId(id); }
public static BaseMessage fromJson(String json) throws JSONException { return new BaseMessage(json); }
public boolean isResult() { return has("result"); }
@Override public void onFailure(Throwable t) { if (t instanceof CancellationException) { log.debug("Canceling {} call", message.getMethod()); } else { log.error("Could not get reply for blockchain.transaction.get", t); } } }, Threading.USER_THREAD);
public static CallMessage fromJson(String json) throws JSONException { return new CallMessage(json); }
public BaseMessage() { setId(-1); }
public String getFailedRequest() { return optString("request"); }
public String getMethod() { return optString("method", ""); }
public long getId() { return optLong("id", -1); }
public static ResultMessage fromJson(String json) throws JSONException { return new ResultMessage(json); }
public void setMethod(String method) { try { put("method", method); } catch (JSONException e) { // Should never happen because "method" is a valid JSON name throw new RuntimeException(e); } }
@Override public void onFailure(Throwable t) { if (t instanceof CancellationException) { log.debug("Canceling {} call", message.getMethod()); } else { log.error("Could not get reply for blockchain.block.get_header", t); } } }, Threading.USER_THREAD);
public CallMessage(long id, String method, List params) { this(method, params); setId(id); }
public boolean isCall() { return has("method"); }
public BaseMessage(long id) { setId(id); }
public String getError() { return optString("error"); }
@Override public void onFailure(Throwable t) { if (t instanceof CancellationException) { log.debug("Canceling {} call", message.getMethod()); } else { log.error("Could not get reply for blockchain.address.get_history", t); } } }, Threading.USER_THREAD);