Package org.apache.juneau.bean.jsonrpc
Class JsonRpcRequest
java.lang.Object
org.apache.juneau.bean.jsonrpc.JsonRpcRequest
JSON-RPC 2.0 request envelope.
The id field may be a String, integral Number, or null (notification).
This envelope is generic JSON-RPC 2.0 and carries no _meta property: MCP-specific per-request
metadata belongs under params._meta, not beside the envelope. See the 2026-07-28 v2 bean
package (org.apache.juneau.bean.mcp.v20260728) for the typed nested carrier.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetId()Request identifier (string, integer, ornullfor notifications).JSON-RPC protocol version (typically"2.0").JSON-RPC method name (for example"tools/list").Method parameters (object, array, ornull).Sets the request id.setJsonrpc(String value) Sets the JSON-RPC protocol version.Sets the JSON-RPC method name.Sets method parameters.
-
Constructor Details
-
JsonRpcRequest
public JsonRpcRequest()
-
-
Method Details
-
getJsonrpc
JSON-RPC protocol version (typically"2.0").- Returns:
- The version token, or
nullif not set.
-
setJsonrpc
Sets the JSON-RPC protocol version.- Parameters:
value- The new value. Can benull to unset the property.- Returns:
- This object (for method chaining).
-
getId
Request identifier (string, integer, ornullfor notifications).- Returns:
- The id, or
nullif not set.
-
setId
Sets the request id.- Parameters:
value- The new value. Can benull to unset the property.- Returns:
- This object (for method chaining).
-
getMethod
JSON-RPC method name (for example"tools/list").- Returns:
- The method, or
nullif not set.
-
setMethod
Sets the JSON-RPC method name.- Parameters:
value- The new value. Can benull to unset the property.- Returns:
- This object (for method chaining).
-
getParams
Method parameters (object, array, ornull).- Returns:
- The params payload, or
nullif not set.
-
setParams
Sets method parameters.- Parameters:
value- The new value. Can benull to unset the property.- Returns:
- This object (for method chaining).
-