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, makeStage
public SyncInvocationStage(Object rv)
public SyncInvocationStage()
public Object get() throws Throwable
InvocationStage
get
in class InvocationStage
Throwable
- Any exception raised during the invocation.public boolean isDone()
isDone
in class InvocationStage
true
if the invocation is complete.public CompletableFuture<Object> toCompletableFuture()
InvocationStage
CompletableFuture
conversion.toCompletableFuture
in class InvocationStage
public <C extends VisitableCommand> Object thenApply(InvocationContext ctx, C command, InvocationSuccessFunction<C> function)
InvocationStage
function
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 InvocationStage
public <C extends VisitableCommand> Object thenAccept(InvocationContext ctx, C command, InvocationSuccessAction<C> action)
InvocationStage
action
.
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 InvocationStage
public <C extends VisitableCommand> Object andExceptionally(InvocationContext ctx, C command, InvocationExceptionFunction<C> function)
InvocationStage
function
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 InvocationStage
public <C extends VisitableCommand> Object andFinally(InvocationContext ctx, C command, InvocationFinallyAction<C> action)
InvocationStage
action
.
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 InvocationStage
public <C extends VisitableCommand> Object andHandle(InvocationContext ctx, C command, InvocationFinallyFunction<C> function)
InvocationStage
function
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 InvocationStage
public <C extends VisitableCommand> Object addCallback(InvocationContext ctx, C command, InvocationCallback<C> function)
InvocationStage
function
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 InvocationStage
public <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 InvocationStage
public <C extends VisitableCommand> InvocationStage thenAcceptMakeStage(InvocationContext ctx, C command, InvocationSuccessAction<C> action)
InvocationStage
action
.
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 InvocationStage
public <C extends VisitableCommand> InvocationStage andExceptionallyMakeStage(InvocationContext ctx, C command, InvocationExceptionFunction<C> function)
InvocationStage
function
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 InvocationStage
public <C extends VisitableCommand> InvocationStage andFinallyMakeStage(InvocationContext ctx, C command, InvocationFinallyAction<C> action)
InvocationStage
action
.
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 InvocationStage
public <C extends VisitableCommand> InvocationStage andHandleMakeStage(InvocationContext ctx, C command, InvocationFinallyFunction<C> function)
InvocationStage
function
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 InvocationStage
public Object thenReturn(InvocationContext ctx, VisitableCommand command, Object returnValue)
InvocationStage
InvocationStage
if it is completed successfully.
The result may be either rv
, a new InvocationStage
or this
thenReturn
in class InvocationStage
Copyright © 2021 JBoss by Red Hat. All rights reserved.