public class SimpleAsyncInvocationStage extends InvocationStage
BaseAsyncInterceptor.asyncValue(CompletionStage).| Modifier and Type | Field and Description |
|---|---|
protected CompletableFuture<Object> |
future |
| Constructor and Description |
|---|
SimpleAsyncInvocationStage(CompletionStage<?> future) |
| Modifier and Type | Method and Description |
|---|---|
<C extends VisitableCommand> |
addCallback(InvocationContext ctx,
C command,
InvocationCallback<C> function)
After the current stage completes, invoke
function and return its result. |
Object |
get()
Wait for the invocation to complete and return its value.
|
boolean |
isDone() |
Object |
thenReturn(InvocationContext ctx,
VisitableCommand command,
Object returnValue)
Overrides the return value of this
InvocationStage if it is completed successfully. |
CompletableFuture<Object> |
toCompletableFuture()
CompletableFuture conversion. |
String |
toString() |
andExceptionally, andExceptionallyMakeStage, andFinally, andFinallyMakeStage, andHandle, andHandleMakeStage, completedNullStage, makeStage, thenAccept, thenAcceptMakeStage, thenApply, thenApplyMakeStageprotected final CompletableFuture<Object> future
public SimpleAsyncInvocationStage(CompletionStage<?> future)
public Object get() throws Throwable
InvocationStageget in class InvocationStageThrowable - Any exception raised during the invocation.public boolean isDone()
isDone in class InvocationStagetrue if the invocation is complete.public CompletableFuture<Object> toCompletableFuture()
InvocationStageCompletableFuture conversion.toCompletableFuture in class InvocationStagepublic <C extends VisitableCommand> Object addCallback(InvocationContext ctx, C command, InvocationCallback<C> function)
InvocationStagefunction and return its result.
The result may be either a plain value, or a new InvocationStage.
If function throws an exception, the result InvocationStage will complete with the same exception.
addCallback in class InvocationStagepublic Object thenReturn(InvocationContext ctx, VisitableCommand command, Object returnValue)
InvocationStageInvocationStage if it is completed successfully.
The result may be either rv, a new InvocationStage or thisthenReturn in class InvocationStageCopyright © 2022 JBoss by Red Hat. All rights reserved.