use of io.crossbar.autobahn.wamp.messages.Call in project autobahn-java by crossbario.
the class Session method reallyCall.
private <T> CompletableFuture<T> reallyCall(String procedure, List<Object> args, Map<String, Object> kwargs, CallOptions options, TypeReference<T> resultTypeReference, Class<T> resultTypeClass) {
throwIfNotConnected();
CompletableFuture<T> future = new CompletableFuture<>();
long requestID = mIDGenerator.next();
mCallRequests.put(requestID, new CallRequest(requestID, procedure, future, options, resultTypeReference, resultTypeClass));
if (options == null) {
send(new Call(requestID, procedure, args, kwargs, 0));
} else {
send(new Call(requestID, procedure, args, kwargs, options.timeout));
}
return future;
}
Aggregations