Package com.mastfrog.acteur
Class DeferredComputationResult
java.lang.Object
com.mastfrog.acteur.DeferredComputationResult
Encapsulates either an object indicating success, or a throwable indicating
failure, which is written to a response using DeferredComputationResultActeur
(added automatically to the chain if you use
Acteur.then(CompletableFuture).- Author:
- Tim Boudreau
- See Also:
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescription<T> TGet the payload as a specific type.static DeferredComputationResultempty()booleanstatic DeferredComputationResultstatic DeferredComputationResultstatic DeferredComputationResult
-
Field Details
-
what
-
thrown
-
onSuccess
public final io.netty.handler.codec.http.HttpResponseStatus onSuccess
-
-
Method Details
-
as
Get the payload as a specific type.- Type Parameters:
T- The type- Parameters:
type- The class of the type- Returns:
- The object cast as the passed type
- Throws:
ClassCastException- if the payload object is non null and not a matching type
-
ifThrown
-
empty
-
of
-
of
public static DeferredComputationResult of(Object what, io.netty.handler.codec.http.HttpResponseStatus onSuccess) -
thrown
-