Class AggregateAnnotationCommandHandler<T>

java.lang.Object
org.axonframework.modelling.command.AggregateAnnotationCommandHandler<T>
Type Parameters:
T - the type of aggregate this handler handles commands for
All Implemented Interfaces:
CommandMessageHandler, MessageHandler<CommandMessage<?>>

public class AggregateAnnotationCommandHandler<T> extends Object implements CommandMessageHandler
Command handler that registers a set of CommandHandler based on annotations of an aggregate. Those annotations may appear on methods, in which case a specific aggregate instance needs to be targeted by the command, or on the constructor. The latter will create a new Aggregate instance, which is then stored in the repository.

Despite being an CommandMessageHandler it does not actually handle the commands. During registration to the CommandBus it registers the CommandMessageHandlers directly instead of itself so duplicate command handlers can be detected and handled correctly.

Since:
1.2
Author:
Allard Buijze