public class SyncInvocationStage extends InvocationStage
| Constructor and Description |
|---|
SyncInvocationStage() |
SyncInvocationStage(Object rv) |
| 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. |
<C extends VisitableCommand> |
andExceptionally(InvocationContext ctx,
C command,
InvocationExceptionFunction<C> function)
After the current stage completes exceptionally, invoke
function and return its result. |
<C extends VisitableCommand> |
andExceptionallyMakeStage(InvocationContext ctx,
C command,
InvocationExceptionFunction<C> function)
After the current stage completes exceptionally, invoke
function and return its result. |
<C extends VisitableCommand> |
andFinally(InvocationContext ctx,
C command,
InvocationFinallyAction<C> action)
After the current stage completes, invoke
action. |
<C extends VisitableCommand> |
andFinallyMakeStage(InvocationContext ctx,
C command,
InvocationFinallyAction<C> action)
After the current stage completes, invoke
action. |
<C extends VisitableCommand> |
andHandle(InvocationContext ctx,
C command,
InvocationFinallyFunction<C> function)
After the current stage completes, invoke
function and return its result. |
<C extends VisitableCommand> |
andHandleMakeStage(InvocationContext ctx,
C command,
InvocationFinallyFunction<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() |
<C extends VisitableCommand> |
thenAccept(InvocationContext ctx,
C command,
InvocationSuccessAction<C> action)
After the current stage completes successfully, invoke
action. |
<C extends VisitableCommand> |
thenAcceptMakeStage(InvocationContext ctx,
C command,
InvocationSuccessAction<C> action)
After the current stage completes successfully, invoke
action. |
<C extends VisitableCommand> |
thenApply(InvocationContext ctx,
C command,
InvocationSuccessFunction<C> function)
After the current stage completes successfully, invoke
function and return its result. |
<C extends VisitableCommand> |
thenApplyMakeStage(InvocationContext ctx,
C command,
InvocationSuccessFunction<C> function)
After the current stage completes successfully, invoke
function and return its result. |
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() |
completedNullStage, makeStagepublic SyncInvocationStage(Object rv)
public SyncInvocationStage()
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 thenApply(InvocationContext ctx, C command, InvocationSuccessFunction<C> function)
InvocationStagefunction and return its result.
The result may be either a plain value, this, or a new InvocationStage.
If function throws an exception, the result InvocationStage will complete with the same exception.
thenApply in class InvocationStagepublic <C extends VisitableCommand> Object thenAccept(InvocationContext ctx, C command, InvocationSuccessAction<C> action)
InvocationStageaction.
The result may be either a plain value, this, or a new InvocationStage.
If action throws an exception, the result InvocationStage will complete with the same exception.
thenAccept in class InvocationStagepublic <C extends VisitableCommand> Object andExceptionally(InvocationContext ctx, C command, InvocationExceptionFunction<C> function)
InvocationStagefunction and return its result.
The result may be either a plain value, this, or a new InvocationStage.
If function throws an exception, the result InvocationStage will complete with the same exception.
andExceptionally in class InvocationStagepublic <C extends VisitableCommand> Object andFinally(InvocationContext ctx, C command, InvocationFinallyAction<C> action)
InvocationStageaction.
The result may be either a plain value, this, or a new InvocationStage.
If action throws an exception, the result InvocationStage will complete with the same exception.
andFinally in class InvocationStagepublic <C extends VisitableCommand> Object andHandle(InvocationContext ctx, C command, InvocationFinallyFunction<C> function)
InvocationStagefunction and return its result.
The result may be either a plain value, this, or a new InvocationStage.
If function throws an exception, the result InvocationStage will complete with the same exception.
andHandle 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 <C extends VisitableCommand> InvocationStage thenApplyMakeStage(InvocationContext ctx, C command, InvocationSuccessFunction<C> function)
function and return its result.
The result may be either a plain value, or a new InvocationStage.thenApplyMakeStage in class InvocationStagepublic <C extends VisitableCommand> InvocationStage thenAcceptMakeStage(InvocationContext ctx, C command, InvocationSuccessAction<C> action)
InvocationStageaction.
The result may be either this, or a new InvocationStage.
If action throws an exception, the result InvocationStage will complete with the same exception.
thenAcceptMakeStage in class InvocationStagepublic <C extends VisitableCommand> InvocationStage andExceptionallyMakeStage(InvocationContext ctx, C command, InvocationExceptionFunction<C> function)
InvocationStagefunction and return its result.
The result may be either this, or a new InvocationStage.
If function throws an exception, the result InvocationStage will complete with the same exception.
andExceptionallyMakeStage in class InvocationStagepublic <C extends VisitableCommand> InvocationStage andFinallyMakeStage(InvocationContext ctx, C command, InvocationFinallyAction<C> action)
InvocationStageaction.
The result may be either this, or a new InvocationStage.
If action throws an exception, the result InvocationStage will complete with the same exception.
andFinallyMakeStage in class InvocationStagepublic <C extends VisitableCommand> InvocationStage andHandleMakeStage(InvocationContext ctx, C command, InvocationFinallyFunction<C> function)
InvocationStagefunction and return its result.
The result may be either this, or a new InvocationStage.
If function throws an exception, the result InvocationStage will complete with the same exception.
andHandleMakeStage 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 © 2021 JBoss by Red Hat. All rights reserved.