public class ExceptionSyncInvocationStage extends InvocationStage
InvocationStage for Throwable.
It is similar to SyncInvocationStage but instead of being used with a successful value, it accepts a Throwable
| Constructor and Description |
|---|
ExceptionSyncInvocationStage(Throwable throwable) |
| Modifier and Type | Method and Description |
|---|---|
Object |
addCallback(InvocationContext ctx,
VisitableCommand command,
InvocationCallback function)
After the current stage completes, invoke
function and return its result. |
Object |
andExceptionally(InvocationContext ctx,
VisitableCommand command,
InvocationExceptionFunction function)
After the current stage completes exceptionally, invoke
function and return its result. |
Object |
andFinally(InvocationContext ctx,
VisitableCommand command,
InvocationFinallyAction action)
After the current stage completes, invoke
action. |
Object |
andHandle(InvocationContext ctx,
VisitableCommand command,
InvocationFinallyFunction 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 |
thenAccept(InvocationContext ctx,
VisitableCommand command,
InvocationSuccessAction function)
After the current stage completes successfully, invoke
action. |
Object |
thenApply(InvocationContext ctx,
VisitableCommand command,
InvocationSuccessFunction 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. |
andExceptionallyMakeStage, andFinallyMakeStage, andHandleMakeStage, completedNullStage, makeStage, thenAcceptMakeStage, thenApplyMakeStagepublic ExceptionSyncInvocationStage(Throwable throwable)
public Object thenApply(InvocationContext ctx, VisitableCommand command, InvocationSuccessFunction 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 Object thenAccept(InvocationContext ctx, VisitableCommand command, InvocationSuccessAction function)
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 Object andExceptionally(InvocationContext ctx, VisitableCommand command, InvocationExceptionFunction 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 Object andFinally(InvocationContext ctx, VisitableCommand command, InvocationFinallyAction 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 Object andHandle(InvocationContext ctx, VisitableCommand command, InvocationFinallyFunction 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 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 InvocationStagepublic 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 Object addCallback(InvocationContext ctx, VisitableCommand command, InvocationCallback 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 InvocationStageCopyright © 2021 JBoss by Red Hat. All rights reserved.