use of io.crossbar.autobahn.wamp.messages.Subscribe in project autobahn-java by crossbario.
the class Session method reallySubscribe.
private <T> CompletableFuture<Subscription> reallySubscribe(String topic, Object handler, SubscribeOptions options, TypeReference<T> resultTypeRef, Class<T> resultTypeClass) {
throwIfNotConnected();
CompletableFuture<Subscription> future = new CompletableFuture<>();
long requestID = mIDGenerator.next();
mSubscribeRequests.put(requestID, new SubscribeRequest(requestID, topic, future, resultTypeRef, resultTypeClass, handler));
send(new Subscribe(requestID, options, topic));
return future;
}
Aggregations