Package com.opencqrs.framework.command
Interface CommandHandler<I,C extends Command,R>
- Type Parameters:
I- the generic type of the instance to be event sourced before handling the commandC- the command typeR- the command execution result type
- All Known Subinterfaces:
CommandHandler.ForCommand<I,,C, R> CommandHandler.ForInstanceAndCommand<I,,C, R> CommandHandler.ForInstanceAndCommandAndMetaData<I,C, R>
public sealed interface CommandHandler<I,C extends Command,R>
permits CommandHandler.ForCommand<I,C,R>, CommandHandler.ForInstanceAndCommand<I,C,R>, CommandHandler.ForInstanceAndCommandAndMetaData<I,C,R>
Sealed base interface for inherited
FunctionalInterface variants encapsulating command-handling logic.
Implementations of this will have to encapsulated into CommandHandlerDefinitions to be executable
CommandRouter.send(Command) or CommandRouter.send(Command).-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceCommandHandler.ForCommand<I,C extends Command, R> FunctionalInterfaceto be implemented, if only theCommandis needed for execution.static interfaceCommandHandler.ForInstanceAndCommand<I,C extends Command, R> FunctionalInterfaceto be implemented, ifCommandand event-sourced instance are needed for execution.static interfaceFunctionalInterfaceto be implemented, ifCommand, meta-data, and event-sourced instance are needed for execution.