Package com.rabbitmq.tools.jsonrpc
Interface JsonRpcMapper
-
- All Known Implementing Classes:
DefaultJsonRpcMapper
,JacksonJsonRpcMapper
public interface JsonRpcMapper
Abstraction to handle JSON parsing and generation. Used byJsonRpcServer
andJsonRpcClient
.- Since:
- 4.8.0
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
JsonRpcMapper.JsonRpcRequest
static class
JsonRpcMapper.JsonRpcResponse
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description JsonRpcMapper.JsonRpcRequest
parse(String requestBody, ServiceDescription description)
Parses a JSON RPC request.JsonRpcMapper.JsonRpcResponse
parse(String responseBody, Class<?> expectedType)
Parses a JSON RPC response.String
write(Object input)
Serialize an object into JSON.
-
-
-
Method Detail
-
parse
JsonRpcMapper.JsonRpcRequest parse(String requestBody, ServiceDescription description)
Parses a JSON RPC request. TheServiceDescription
can be used to look up the invoked procedure and learn about its signature.- Parameters:
requestBody
-description
-- Returns:
-
parse
JsonRpcMapper.JsonRpcResponse parse(String responseBody, Class<?> expectedType)
Parses a JSON RPC response.- Parameters:
responseBody
-expectedType
-- Returns:
-
-