ikrs.json.rpc
Interface JSONRPCRequest

All Superinterfaces:
JSONValue
All Known Implementing Classes:
DefaultJSONRPCRequest

public interface JSONRPCRequest
extends JSONValue


Field Summary
 
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 getID()
          Get the ID of this resquest.
 JSONValue getMethod()
          Get the request's method name.
 JSONValue getParams()
          Get the request's method params.
 JSONValue getVersion()
          This method returns the value of the 'jsonrpc' field from this request.
 
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
 

Method Detail

getVersion

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

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

getMethod

JSONValue getMethod()
Get the request's method name. Note that method names are case sensitive in RPC requests!

Returns:
null if no method field is present.

getParams

JSONValue getParams()
Get the request's method params. Due to the specification there are two possible ways to pass params: (A) as JSON array (addressed by array indices). (B) as JSON object (addressed by member names).

Returns:
The RPC params of this request (must be array or object).

getID

JSONValue getID()
Get the ID of this resquest. Each response identifies the related request by the use of it's unique ID. Note that 'notifications' are special requests that expect no response. A notification is a request without an ID. Server MUST NOT response to notifications.

Returns:
The ID of this request. The ID is null if this request is a notification.