ikrs.json.rpc
Interface JSONRPCError

All Superinterfaces:
JSONValue
All Known Implementing Classes:
DefaultJSONRPCError

public interface JSONRPCError
extends JSONValue


Field Summary
static int CODE_INTERNAL_JSON_ERROR
          Internal error.
static int CODE_INVALID_PARAMS
          Invalid params.
static int CODE_INVALID_REQUEST
          Invalid Request.
static int CODE_METHOD_NOT_FOUND
          Method not found.
static int CODE_PARSE_ERROR
          Parse error.
static int CODE_SERVER_ERROR_MIN
          Server error.
 
Fields inherited from interface ikrs.json.JSONValue
FALSE, NULL, TRUE, TYPE_ARRAY, TYPE_BOOLEAN, TYPE_NULL, TYPE_NUMBER, TYPE_OBJECT, TYPE_STRING
 
Method Summary
 JSONValue getCode()
          This method returns the value of the 'jsonrpc' field from this request.
 JSONValue getData()
          Get the error object from the response (if result is null).
 JSONValue getMessage()
          Get the RPC result of the call.
 
Methods inherited from interface ikrs.json.JSONValue
asJSONArray, asJSONBoolean, asJSONNumber, asJSONObject, asJSONString, getArray, getBoolean, getNumber, getObject, getString, isArray, isBoolean, isNull, isNumber, isObject, isString, toJSONString, write
 

Field Detail

CODE_PARSE_ERROR

static final int CODE_PARSE_ERROR
Parse error. Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text.

See Also:
Constant Field Values

CODE_INVALID_REQUEST

static final int CODE_INVALID_REQUEST
Invalid Request. The JSON sent is not a valid Request object.

See Also:
Constant Field Values

CODE_METHOD_NOT_FOUND

static final int CODE_METHOD_NOT_FOUND
Method not found. The method does not exist / is not available.

See Also:
Constant Field Values

CODE_INVALID_PARAMS

static final int CODE_INVALID_PARAMS
Invalid params. Invalid method parameter(s).

See Also:
Constant Field Values

CODE_INTERNAL_JSON_ERROR

static final int CODE_INTERNAL_JSON_ERROR
Internal error. Internal JSON-RPC error.

See Also:
Constant Field Values

CODE_SERVER_ERROR_MIN

static final int CODE_SERVER_ERROR_MIN
Server error. Reserved for implementation-defined server-errors.

See Also:
Constant Field Values
Method Detail

getCode

JSONValue getCode()
This method returns the value of the 'jsonrpc' field from this request.

Returns:
null if the request has no 'jsonrpc' field.

getMessage

JSONValue getMessage()
Get the RPC result of the call. Due to the specification the result MUST be null if there were errors.

Returns:
The RPC result or JSON-null/Java-null on errors.

getData

JSONValue getData()
Get the error object from the response (if result is null). Due to the specification the error object MUST be null if there were no errors.

Returns:
The error result if there were errors.