public class JsonRpcClient extends Object
RequestBuilder.
It's parametrized by Transport and Jackson ObjectMapper| Constructor and Description |
|---|
JsonRpcClient(Transport transport)
Constructs a new JSON-RPC client with a specified transport
|
JsonRpcClient(Transport transport,
com.fasterxml.jackson.databind.ObjectMapper mapper)
Constructs a new JSON-RPC client with a specified transport and user-definder JSON mapper
|
| Modifier and Type | Method and Description |
|---|---|
BatchRequestBuilder<?,?> |
createBatchRequest()
Creates a builder of a JSON-RPC batch request in initial state
|
NotificationRequestBuilder |
createNotification()
Creates a builder of a JSON-RPC notification request in initial state
|
RequestBuilder<Object> |
createRequest()
Creates a builder of a JSON-RPC request in initial state
|
<T> T |
onDemand(Class<T> clazz)
Creates a new proxy for accessing a remote JSON-RPC service through an interface
|
<T> T |
onDemand(Class<T> clazz,
IdGenerator<?> idGenerator)
Creates a new proxy for accessing a remote JSON-RPC service through an interface
with a custom id generator that overrides the interface generator.
|
<T> T |
onDemand(Class<T> clazz,
ParamsType paramsType)
Creates a new proxy for accessing a remote JSON-RPC service through an interface
with a custom type of request params.
|
<T> T |
onDemand(Class<T> clazz,
ParamsType paramsType,
IdGenerator<?> idGenerator)
Creates a new proxy for accessing a remote JSON-RPC service through an interface
with a custom id generator and custom type of request params.
|
public JsonRpcClient(Transport transport)
transport - transport implementationpublic JsonRpcClient(Transport transport, com.fasterxml.jackson.databind.ObjectMapper mapper)
transport - transport implementationmapper - JSON mapperpublic RequestBuilder<Object> createRequest()
public NotificationRequestBuilder createNotification()
public BatchRequestBuilder<?,?> createBatchRequest()
public <T> T onDemand(Class<T> clazz)
T - interface typeclazz - interface metadatapublic <T> T onDemand(Class<T> clazz, IdGenerator<?> idGenerator)
T - interface typeclazz - interface metadataidGenerator - custom id generatorpublic <T> T onDemand(Class<T> clazz, ParamsType paramsType)
T - interface typeclazz - interface metadataparamsType - custom type of request paramspublic <T> T onDemand(Class<T> clazz, ParamsType paramsType, IdGenerator<?> idGenerator)
T - interface typeclazz - interface metadataidGenerator - custom id generatorparamsType - custom type of request paramsCopyright © 2018. All rights reserved.