Class MonoToListenableFutureAdapter<T>

java.lang.Object
org.springframework.util.concurrent.CompletableToListenableFutureAdapter<T>
org.springframework.util.concurrent.MonoToListenableFutureAdapter<T>
Type Parameters:
T - the object type
All Implemented Interfaces:
Future<T>, ListenableFuture<T>

public class MonoToListenableFutureAdapter<T> extends CompletableToListenableFutureAdapter<T>
Adapts a Mono into a ListenableFuture by obtaining a CompletableFuture from the Mono via Mono.toFuture() and then adapting it with CompletableToListenableFutureAdapter.
Since:
5.1
Author:
Rossen Stoyanchev, Stephane Maldini
  • Constructor Details

    • MonoToListenableFutureAdapter

      public MonoToListenableFutureAdapter(reactor.core.publisher.Mono<T> mono)