RpcRequest.Builder

public static class Builder

Constructors

Builder

public Builder()

Methods

build

public RpcRequest build()

setId

public Builder setId(int id)

An identifier established by the client that MUST contain a String, Number or NULL value, if included. If not included request is assumed to be a notification.

Parameters:
  • id – identifier value
Returns:

this, updated rpc request builder

setId

public Builder setId(String id)

An identifier established by the client that MUST contain a String, Number or NULL value, if included. If not included request is assumed to be a notification.

Parameters:
  • id – identifier value
Returns:

this, updated rpc request builder

setMethod

public Builder setMethod(String method)

String containing the name of the method to be invoked

Parameters:
  • method – cannot begin with “rpc.”
Returns:

this, updated rpc request builder

setParams

public Builder setParams(JsonArray params)

Sets the parameters to a pre-populated list.

Parameters:
  • params – object or list of parameters
Returns:

this, updated rpc request builder

setParams

public Builder setParams(JsonObject params)

Sets the parameters to an object list.

Parameters:
  • params – object or list of parameters
Returns:

this, updated rpc request builder

setVersion

public Builder setVersion(String version)

Sets the jsonrpc version. You probably don’t want to change this

Returns:this, updated rpc request builder