public class AsyncCallbackToCompletableFutureAdapter<T> extends Object implements AsyncCallback
Constructor and Description |
---|
AsyncCallbackToCompletableFutureAdapter() |
AsyncCallbackToCompletableFutureAdapter(CompletableFuture<T> future,
T result) |
AsyncCallbackToCompletableFutureAdapter(T result) |
Modifier and Type | Method and Description |
---|---|
void |
done(boolean doneSync)
This method is invoked once the
Exchange is done. |
CompletableFuture<T> |
getFuture() |
void |
setResult(T result) |
public AsyncCallbackToCompletableFutureAdapter()
public AsyncCallbackToCompletableFutureAdapter(T result)
public AsyncCallbackToCompletableFutureAdapter(CompletableFuture<T> future, T result)
public CompletableFuture<T> getFuture()
public void done(boolean doneSync)
AsyncCallback
Exchange
is done.
If an exception occurred while processing the exchange, the exception field of the
Exchange
being processed will hold the caused exception.done
in interface AsyncCallback
doneSync
- is true if the processing of the Exchange
was completed by a synchronous thread.
Otherwise its false to indicate it was completed by an asynchronous thread.Apache Camel