Package com.opencqrs.framework.command
package com.opencqrs.framework.command
Components for command handling.
-
ClassDescriptionInterface to be implemented by commands that can be handled by
CommandHandler
s.The subject condition checked beforeCommandHandler
execution.Default implementation ofCommandEventPublisher
used byCommandRouter
to apply events to theStateRebuildingHandler
s relevant for theCommand
being executed.Extension toEventPublisher
providing additional operations for publishing events relative to theCommand.getSubject()
being handled.CommandHandler<I,C extends Command, R> Sealed base interface for inheritedFunctionalInterface
variants encapsulating command-handling logic.CommandHandler.ForCommand<I,C extends Command, R> FunctionalInterface
to be implemented, if only theCommand
is needed for execution.CommandHandler.ForInstanceAndCommand<I,C extends Command, R> FunctionalInterface
to be implemented, ifCommand
and event-sourced instance are needed for execution.CommandHandler.ForInstanceAndCommandAndMetaData<I,C extends Command, R> FunctionalInterface
to be implemented, ifCommand
, meta-data, and event-sourced instance are needed for execution.Annotation to be used forConfiguration
s containingCommandHandling
annotated methods,CommandHandlerDefinition
Bean
s, @StateRebuilding
annotated methods, andStateRebuildingHandlerDefinition
Bean
s in order to be able to test them usingCommandHandlingTest
.CommandHandlerDefinition<I,C extends Command, R> CommandHandler
definition suitable for being processed by theCommandRouter
.Annotation to be used in favor of definingCommandHandlerDefinition
Bean
s.Auto-configuration forCommandHandlerDefinition
s defined viaCommandHandling
annotated bean methods.Annotation that can be used for Spring Boot tests that focus only on CQRSCommandHandlerDefinition
s in favor of initializingCommandHandlingTestFixture
manually.Auto-configuration forCommandHandlingTestFixture
s.CommandHandlingTestFixture<I,C extends Command, R> Test support forCommandHandler
orCommandHandlerDefinition
.Builder forCommandHandlingTestFixture
.Fluent API helper class for asserting a captured events.Marker annotation for assertion methods withinCommandHandlingTestFixture.Expect
which proceed through the captured event stream, if invoked.Fluent API helper class for fine granular specification of a single given event.Command
router implementation providing CQRS-style command execution.Auto-configuration forCommandRouter
andStateRebuildingCache
default implementations.Exception thrown ifCommand.SubjectCondition.PRISTINE
is violated.Exception thrown ifCommand.SubjectCondition
is violated.Exception thrown ifCommand.SubjectCondition.EXISTS
is violated.The type of sourcing affecting which events will be sourced forCommandHandler
s.Annotation to be used in favor of definingStateRebuildingHandlerDefinition
Bean
s.Auto-configuration forStateRebuildingHandlerDefinition
s defined viaStateRebuilding
annotated bean methods.Sealed base interface for inheritedFunctionalInterface
variants encapsulating the event-sourcing logic needed to reconstruct instance state from an event stream.FunctionalInterface
to be implemented, if only the Java event is needed to reconstruct the instance state.FunctionalInterface
to be implemented, if the Java event and its meta-data is needed to reconstruct the instance state.FunctionalInterface
to be implemented, if the Java event, its meta-data, and subject is needed to reconstruct the instance state.FunctionalInterface
to be implemented, if the Java event, its meta-data, subject, and optional raw event is needed to reconstruct the instance state.FunctionalInterface
to be implemented, if the Java event and the rawEvent
is needed to reconstruct the instance state.StateRebuildingHandler
definition suitable for event-sourcing an instance prior tocommand handling
.