Package org.consensusj.jsonrpc
Interface JsonRpcService
- All Known Subinterfaces:
JsonRpcServiceWrapper
- All Known Implementing Classes:
AbstractJsonRpcService
,DelegatingJsonRpcService
,EchoJsonRpcService
,MathService
,WalletAppKitJsonRpcService
public interface JsonRpcService
Interface for an Asynchronous JSON-RPC Server/Service.
A service-layer abstraction of JSON-RPC using plain old Java objects (POJOs)
Can easily be used in controllers from Java Web frameworks.
-
Method Summary
Modifier and TypeMethodDescription<RSLT> CompletableFuture
<JsonRpcResponse<RSLT>> call
(JsonRpcRequest req) Handle a JSON-RPCJsonRpcRequest
and return aJsonRpcResponse
POJO
-
Method Details
-
call
Handle a JSON-RPCJsonRpcRequest
and return aJsonRpcResponse
POJO- Type Parameters:
RSLT
- Generic type for the JSON-RPC result inJsonRpcResponse.getResult()
- Parameters:
req
- A Request object- Returns:
- a future for a Response object with either a result or an error.
-