Package kalix.javasdk.action
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.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceConstruct the effect that is returned by the command handler. -
Method Summary
Modifier and TypeMethodDescriptionaddSideEffect(SideEffect... sideEffects) Attach the given side effects to this reply.addSideEffects(Collection<SideEffect> sideEffects) Attach the given side effects to this reply.boolean
-
Method Details
-
addSideEffect
Attach the given side effects to this reply.- Parameters:
sideEffects- The effects to attach.- Returns:
- A new reply with the attached effects.
-
addSideEffects
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.
-