S
- the type of object expected from the Promise
T
- the type of object expected from the ListenableFuture
public abstract class AbstractPromiseToListenableFutureAdapter<S,T> extends Object implements org.springframework.util.concurrent.ListenableFuture<T>
Promise
to ListenableFuture
optionally converting
the result Object type <S>
to the expected target type <T>
.Modifier | Constructor and Description |
---|---|
protected |
AbstractPromiseToListenableFutureAdapter(reactor.core.composable.Promise<S> promise) |
Modifier and Type | Method and Description |
---|---|
protected abstract T |
adapt(S result) |
void |
addCallback(org.springframework.util.concurrent.ListenableFutureCallback<? super T> callback) |
boolean |
cancel(boolean mayInterruptIfRunning) |
T |
get() |
T |
get(long timeout,
TimeUnit unit) |
boolean |
isCancelled() |
boolean |
isDone() |
protected AbstractPromiseToListenableFutureAdapter(reactor.core.composable.Promise<S> promise)
public T get() throws InterruptedException
get
in interface Future<T>
InterruptedException
public T get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException
get
in interface Future<T>
InterruptedException
ExecutionException
TimeoutException
public boolean cancel(boolean mayInterruptIfRunning)
public boolean isCancelled()
isCancelled
in interface Future<T>