Package com.opencqrs.framework.command
@NullMarked
package com.opencqrs.framework.command
Components for command handling.
-
ClassDescriptionInterface to be implemented by commands that can be handled by
CommandHandlers.The subject condition checked beforeCommandHandlerexecution.Default implementation ofCommandEventPublisherused byCommandRouterto apply events to theStateRebuildingHandlers relevant for theCommandbeing executed.Extension toEventPublisherproviding additional operations for publishing events relative to theCommand.getSubject()being handled.CommandHandler<I,C extends Command, R> Sealed base interface for inheritedFunctionalInterfacevariants encapsulating command-handling logic.CommandHandler.ForCommand<I,C extends Command, R> FunctionalInterfaceto be implemented, if only theCommandis needed for execution.CommandHandler.ForInstanceAndCommand<I,C extends Command, R> FunctionalInterfaceto be implemented, ifCommandand event-sourced instance are needed for execution.CommandHandler.ForInstanceAndCommandAndMetaData<I,C extends Command, R> FunctionalInterfaceto be implemented, ifCommand, meta-data, and event-sourced instance are needed for execution.Annotation to be used forConfigurations containingCommandHandlingannotated methods,CommandHandlerDefinitionBeans, @StateRebuildingannotated methods, andStateRebuildingHandlerDefinitionBeans in order to be able to test them usingCommandHandlingTest.CommandHandlerDefinition<I,C extends Command, R> CommandHandlerdefinition suitable for being processed by theCommandRouter.Annotation to be used in favor of definingCommandHandlerDefinitionBeans.Auto-configuration forCommandHandlerDefinitions defined viaCommandHandlingannotated bean methods.Annotation that can be used for Spring Boot tests that focus only on CQRSCommandHandlerDefinitions in favor of initializingCommandHandlingTestFixturemanually.Auto-configuration forCommandHandlingTestFixtures.CommandHandlingTestFixture<C extends Command>Test support forCommandHandlerorCommandHandlerDefinition.Builder forCommandHandlingTestFixture.Fluent API helper class for asserting captured events.Fluent API helper class encapsulating the results of aCommandHandlerexecution for assertion.Commandrouter implementation providing CQRS-style command execution.Auto-configuration forCommandRouterandStateRebuildingCachedefault implementations.Exception thrown ifCommand.SubjectCondition.PRISTINEis violated.Exception thrown ifCommand.SubjectConditionis violated.Exception thrown ifCommand.SubjectCondition.EXISTSis violated.Interface for comprehensive assertions on captured events, providing access to payload, meta-data, and subject.Fluent API for specifying the attributes of a single given event.DSL interfaces for the "Expect" (or "Then") phase of command handling tests.Fluent API for asserting against all captured events.Fluent API interface for validating individual captured events.Fluent API for assertions after failed command execution.Fluent API for asserting against events sequentially using a consuming cursor.Entry point for specifying whether the command execution is expected to succeed or fail.Fluent API for assertions after successful command execution.Fluent API for configuring test preconditions before command execution.GivenDsl.Initial<C extends Command>Entry point for the Given phase, returned byCommandHandlingTestFixture.given().GivenDsl.Terminated<C extends Command>Terminal state of the Given phase after callingGivenDsl.Initial.nothing().The type of sourcing affecting which events will be sourced forCommandHandlers.Annotation to be used in favor of definingStateRebuildingHandlerDefinitionBeans.Auto-configuration forStateRebuildingHandlerDefinitions defined viaStateRebuildingannotated bean methods.Sealed base interface for inheritedFunctionalInterfacevariants encapsulating the event-sourcing logic needed to reconstruct instance state from an event stream.FunctionalInterfaceto be implemented, if only the Java event is needed to reconstruct the instance state.FunctionalInterfaceto be implemented, if the Java event and its meta-data is needed to reconstruct the instance state.FunctionalInterfaceto be implemented, if the Java event, its meta-data, and subject is needed to reconstruct the instance state.FunctionalInterfaceto be implemented, if the Java event, its meta-data, subject, and optional raw event is needed to reconstruct the instance state.FunctionalInterfaceto be implemented, if the Java event and the rawEventis needed to reconstruct the instance state.StateRebuildingHandlerdefinition suitable for event-sourcing an instance prior tocommand handling.