S - the type of object expected from the PromiseT - the type of object expected from the ListenableFuturepublic abstract class AbstractPromiseToListenableFutureAdapter<S,T>
extends java.lang.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,
java.util.concurrent.TimeUnit unit) |
boolean |
isCancelled() |
boolean |
isDone() |
protected AbstractPromiseToListenableFutureAdapter(reactor.core.composable.Promise<S> promise)
public T get() throws java.lang.InterruptedException
get in interface java.util.concurrent.Future<T>java.lang.InterruptedExceptionpublic T get(long timeout, java.util.concurrent.TimeUnit unit) throws java.lang.InterruptedException, java.util.concurrent.ExecutionException, java.util.concurrent.TimeoutException
get in interface java.util.concurrent.Future<T>java.lang.InterruptedExceptionjava.util.concurrent.ExecutionExceptionjava.util.concurrent.TimeoutExceptionpublic boolean cancel(boolean mayInterruptIfRunning)
cancel in interface java.util.concurrent.Future<T>public boolean isCancelled()
isCancelled in interface java.util.concurrent.Future<T>public boolean isDone()
isDone in interface java.util.concurrent.Future<T>