Command Handler

Command Handler is an object which receives commands, modifies the state of the application, and generates events if the modification was successful.

final class TaskAggregate
    extends Aggregate<TaskId, Task, TaskVBuilder> {
    TaskCreated handle(CreateTask cmd, CommandContext ctx) {
        return TaskCreated

Aggregate is an example of such classes. Objects can be Aggregate, ProcessManager and others inheriting AbstractCommandHandler. All above-mentioned classes implement CommandHandler interface.

For more details, refer to Java section.