Class ListenableFutureAdapter<T,S>

java.lang.Object
org.springframework.util.concurrent.FutureAdapter<T,S>
org.springframework.util.concurrent.ListenableFutureAdapter<T,S>
Type Parameters:
T - the type of this Future
S - the type of the adaptee's Future
All Implemented Interfaces:
Future<T>, ListenableFuture<T>

public abstract class ListenableFutureAdapter<T,S> extends FutureAdapter<T,S> implements ListenableFuture<T>
Abstract class that adapts a ListenableFuture parameterized over S into a ListenableFuture parameterized over T. All methods are delegated to the adaptee, where FutureAdapter.get(), FutureAdapter.get(long, java.util.concurrent.TimeUnit), and SuccessCallback.onSuccess(Object) call FutureAdapter.adapt(Object) on the adaptee's result.
Since:
4.0
Author:
Arjen Poutsma
  • Constructor Details

    • ListenableFutureAdapter

      protected ListenableFutureAdapter(ListenableFuture<S> adaptee)
      Construct a new ListenableFutureAdapter with the given adaptee.
      Parameters:
      adaptee - the future to adapt to
  • Method Details