Class JsonRpcRequest (1.42.3)

public class JsonRpcRequest extends GenericData

Beta
JSON-RPC 2.0 request object.

Implementation is not thread-safe.

Inheritance

Object > AbstractMap > GenericData > JsonRpcRequest

Constructors

JsonRpcRequest()

public JsonRpcRequest()

Methods

clone()

public JsonRpcRequest clone()

Makes a "deep" clone of the generic data, in which the clone is completely independent of the original.

Returns
TypeDescription
JsonRpcRequest
Overrides

getId()

public Object getId()

Returns the identifier established by the client that must be a string or a number or null for a notification and therefore not expect to receive a response.

Returns
TypeDescription
Object

getMethod()

public String getMethod()

Returns the name of the method to be invoked.

Returns
TypeDescription
String

getParameters()

public Object getParameters()

Returns the structured value that holds the parameter values to be used during the invocation of the method or null for none.

Returns
TypeDescription
Object

getVersion()

public String getVersion()

Returns the version of the JSON-RPC protocol which is "2.0".

Returns
TypeDescription
String

set(String fieldName, Object value)

public JsonRpcRequest set(String fieldName, Object value)

Sets the given field value (may be null) for the given field name. Any existing value for the field will be overwritten. It may be more slightly more efficient than #put(String, Object) because it avoids accessing the field's original value.

Overriding is only supported for the purpose of calling the super implementation and changing the return type, but nothing else.

Parameters
NameDescription
fieldNameString
valueObject
Returns
TypeDescription
JsonRpcRequest
Overrides

setId(Object id)

public void setId(Object id)

Sets the identifier established by the client that must be a string or a number or null for a notification and therefore not expect to receive a response.

Parameter
NameDescription
idObject

setMethod(String method)

public void setMethod(String method)

Sets the name of the method to be invoked.

Parameter
NameDescription
methodString

setParameters(Object parameters)

public void setParameters(Object parameters)

Sets the structured value that holds the parameter values to be used during the invocation of the method or null for none.

Parameter
NameDescription
parametersObject