RpcResponse.Builder

public static class Builder

Constructors

Builder

public Builder()

Methods

build

public RpcResponse build()

setError

public Builder setError(RpcError error)

Sets the error and removes the result, if one has been set

Returns:this, updated rpc response builder

setId

public Builder setId(Object id)

Sets the id. Usually the same as RpcRequest.getId().

Returns:this, updated rpc response builder

setResult

public Builder setResult(JsonObject result)

Sets the result and removes the error, if one has been set

Returns:this, updated rpc response builder

setVersion

public Builder setVersion(String version)

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

Returns:this, updated rpc response builder