Interface ActionResult<T>
-
- Type Parameters:
T- The type of reply that is expected from invoking a command handler
public interface ActionResult<T>Represents the result of an Action handling a command when run in through the testkit.Not for user extension, returned by the generated testkit.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.concurrent.CompletionStage<ActionResult<T>>getAsyncResult()java.lang.StringgetError()ServiceCallDetails<T>getForward()TgetReply()booleanisAsync()booleanisError()booleanisForward()booleanisNoReply()booleanisReply()
-
-
-
Method Detail
-
isReply
boolean isReply()
- Returns:
- true if the call had an effect with a reply, false if not
-
getReply
T getReply()
- Returns:
- The reply message if the returned effect was a reply or throws if the returned effect was not a reply.
-
isForward
boolean isForward()
- Returns:
- true if the call was forwarded, false if not
-
getForward
ServiceCallDetails<T> getForward()
- Returns:
- An object with details about the forward. If the result was not a forward an exception is thrown.
-
isAsync
boolean isAsync()
- Returns:
- true if the call was async, false if not
-
getAsyncResult
java.util.concurrent.CompletionStage<ActionResult<T>> getAsyncResult()
- Returns:
- The future result if the returned effect was an async effect or throws if the returned effect was not async.
-
isError
boolean isError()
- Returns:
- true if the call was an error, false if not
-
getError
java.lang.String getError()
- Returns:
- The error description returned or throws if the effect returned by the action was not an error
-
isNoReply
boolean isNoReply()
- Returns:
- true if the call had a noReply effect, false if not
-
-