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 testkit.

  • Method Details

    • 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

      DeferredCallDetails<?,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

      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.
    • isIgnore

      boolean isIgnore()
      Returns:
      true if the returned effect was ignore, false if not
    • isError

      boolean isError()
      Returns:
      true if the call was an error, false if not
    • getError

      String getError()
      Returns:
      The error description returned or throws if the effect returned by the action was not an error
    • getErrorStatusCode

      io.grpc.Status.Code getErrorStatusCode()
      Returns:
      The error status code or throws if the effect returned by the action was not an error.
    • getSideEffects

      List<DeferredCallDetails<?,?>> getSideEffects()
      Returns:
      The list of side effects