Mutable builder for nested Java CommandHandlers where different states should have different command handlers.
Mutable builder for nested Java CommandHandlers where different states should have different command handlers.
CommandHandler per state are added with the match
methods and finally a CommandHandler is created with ByStateCommandHandlerBuilder#build.
Match statements are appended and evaluated in order, the first one to match is used. If no match is found when evaluating the built CommandHandler for a given state a scala.MatchError is thrown.
FunctionalInterface for reacting on commands
FunctionalInterface for reacting on commands
Used with CommandHandlerBuilder to setup the behavior of a PersistentBehavior
FunctionalInterface for reacting on signals
FunctionalInterface for reacting on signals
Used with CommandHandlerBuilder to setup the behavior of a PersistentBehavior
A command handler returns an Effect
directive that defines what event or events to persist.
A command handler returns an Effect
directive that defines what event or events to persist.
Additional side effects can be performed in the callback andThen
Instances of Effect
are available through factories in the respective Java and Scala DSL packages.
Not intended for user extension.
FunctionalInterface for reacting on events having been persisted
FunctionalInterface for reacting on events having been persisted
Used with EventHandlerBuilder to setup the behavior of a PersistentBehavior