Interface Action.Effect<T>

Type Parameters:
T - The type of the message that must be returned by this call.
Enclosing class:
Action

public static interface Action.Effect<T>
A return type to allow returning forwards or failures, and attaching effects to messages.
  • Method Details

    • addSideEffect

      Action.Effect<T> addSideEffect(SideEffect... sideEffects)
      Attach the given side effects to this reply.
      Parameters:
      sideEffects - The effects to attach.
      Returns:
      A new reply with the attached effects.
    • addSideEffects

      Action.Effect<T> addSideEffects(Collection<SideEffect> sideEffects)
      Attach the given side effects to this reply.
      Parameters:
      sideEffects - The effects to attach.
      Returns:
      A new reply with the attached effects.
    • canHaveSideEffects

      boolean canHaveSideEffects()
      Returns:
      true if this effect supports attaching side effects, if returning false addSideEffects will throw an exception.