@@ -26,11 +26,15 @@ public abstract class BaseTransport implements Rpc.Transport {
2626 /* Get next Response as raw JSON String from the RPC server */
2727 protected abstract String getResponse();
2828
29- public void call(String method, Object... params) throws RpcException {
29+ public ObjectMapper getObjectMapper() {
30+ return mapper;
31+ }
32+
33+ public void call(String method, JsonNode... params) throws RpcException {
3034 innerCall(method, params);
3135 }
3236
33- public <T > T callForResult(TypeReference<T > resultType, String method, Object ... params) throws RpcException {
37+ public <T > T callForResult(TypeReference<T > resultType, String method, JsonNode ... params) throws RpcException {
3438 try {
3539 JsonNode node = innerCall(method, params);
3640 if (node.isNull()) return null;
@@ -40,7 +44,7 @@ public abstract class BaseTransport implements Rpc.Transport {
4044 }
4145 }
4246
43- private JsonNode innerCall(String method, Object ... params) throws RpcException {
47+ private JsonNode innerCall(String method, JsonNode ... params) throws RpcException {
4448 int id;
4549 synchronized (this) {
4650 id = ++requestId;
@@ -101,10 +105,10 @@ public abstract class BaseTransport implements Rpc.Transport {
101105 private static class Request {
102106 private final String jsonrpc = "2.0";
103107 public final String method;
104- public final Object [] params;
108+ public final JsonNode [] params;
105109 public final int id;
106110
107- public Request(String method, Object [] params, int id) {
111+ public Request(String method, JsonNode [] params, int id) {
108112 this.method = method;
109113 this.params = params;
110114 this.id = id;
0 commit comments