public static class McpSchema.JSONRPCResponse extends java.lang.Object implements McpSchema.JSONRPCMessage
| 限定符和类型 | 类和说明 |
|---|---|
static class |
McpSchema.JSONRPCResponse.JSONRPCError
A response to a request that indicates an error occurred.
|
| 构造器和说明 |
|---|
JSONRPCResponse(java.lang.String jsonrpc,
java.lang.Object id,
java.lang.Object result,
McpSchema.JSONRPCResponse.JSONRPCError error) |
public JSONRPCResponse(java.lang.String jsonrpc,
java.lang.Object id,
java.lang.Object result,
McpSchema.JSONRPCResponse.JSONRPCError error)
jsonrpc - The JSON-RPC version (must be "2.0")id - The request identifier that this response corresponds toresult - The result of the successful request; null if errorerror - Error information if the request failed; null if has resultpublic java.lang.String jsonrpc()
jsonrpc 在接口中 McpSchema.JSONRPCMessagepublic java.lang.Object id()
public java.lang.Object result()
public McpSchema.JSONRPCResponse.JSONRPCError error()