Package org.apache.camel.support
Class AsyncCallbackToCompletableFutureAdapter<T>
- java.lang.Object
-
- org.apache.camel.support.AsyncCallbackToCompletableFutureAdapter<T>
-
- All Implemented Interfaces:
Runnable
,org.apache.camel.AsyncCallback
public class AsyncCallbackToCompletableFutureAdapter<T> extends Object implements org.apache.camel.AsyncCallback
AsyncCallback that provides aCompletableFuture
completed when async action is done
-
-
Constructor Summary
Constructors Constructor Description AsyncCallbackToCompletableFutureAdapter()
AsyncCallbackToCompletableFutureAdapter(CompletableFuture<T> future, T result)
AsyncCallbackToCompletableFutureAdapter(T result)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
done(boolean doneSync)
CompletableFuture<T>
getFuture()
void
setResult(T result)
-
-
-
Constructor Detail
-
AsyncCallbackToCompletableFutureAdapter
public AsyncCallbackToCompletableFutureAdapter()
-
AsyncCallbackToCompletableFutureAdapter
public AsyncCallbackToCompletableFutureAdapter(T result)
-
AsyncCallbackToCompletableFutureAdapter
public AsyncCallbackToCompletableFutureAdapter(CompletableFuture<T> future, T result)
-
-
Method Detail
-
setResult
public void setResult(T result)
-
getFuture
public CompletableFuture<T> getFuture()
-
done
public void done(boolean doneSync)
- Specified by:
done
in interfaceorg.apache.camel.AsyncCallback
-
-