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 CommandHandlerDefinition
s to be executable
CommandRouter.send(Command)
or CommandRouter.send(Command)
.-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interface
CommandHandler.ForCommand<I,
C extends Command, R> FunctionalInterface
to be implemented, if only theCommand
is needed for execution.static interface
CommandHandler.ForInstanceAndCommand<I,
C extends Command, R> FunctionalInterface
to be implemented, ifCommand
and event-sourced instance are needed for execution.static interface
FunctionalInterface
to be implemented, ifCommand
, meta-data, and event-sourced instance are needed for execution.