Interface JsonRpcRequest

All Superinterfaces:
HttpRequest, ServerRequest

public interface JsonRpcRequest extends ServerRequest
A representation of a JSON-RPC request.
  • Method Details

    • version

      String version()
      The request version. Always "2.0".
      Returns:
      the request version
    • rpcMethod

      String rpcMethod()
      The JSON-RPC request method name.
      Returns:
      the request method
    • rpcId

      The JSON-RPC request ID, if present.
      Returns:
      an optional request ID
    • params

      JsonRpcParams params()
      The params associated with the request. If omitted in the request, then internally initialized using JsonValue.EMPTY_JSON_OBJECT.
      Returns:
      the params
    • asJsonObject

      JsonObject asJsonObject()
      Get a complete request as a JSON object.
      Returns:
      a JSON object that represents the request