org.axonframework.commandhandling
Interface CommandHandler<T>
- Type Parameters:
T - The type of command this handler can handle
- All Known Implementing Classes:
- AggregateAnnotationCommandHandler, AnnotationCommandHandlerAdapter, CreateToDoCommandHandler, MarkCompletedCommandHandler
public interface CommandHandler<T>
Marks an instance that is capable of handling commands. CommandHandlers need to be subscribed to a CommandBus in order to receive command of the specified type T.
- Since:
- 0.5
- Author:
- Allard Buijze
handle
Object handle(CommandMessage<T> commandMessage,
UnitOfWork unitOfWork)
throws Throwable
- Handles the given
command.
- Parameters:
commandMessage - The message carrying the command to process.unitOfWork - The UnitOfWork the command is processed in
- Returns:
- The result of the command processing, if any.
- Throws:
Throwable - any exception that occurs during command handling
Copyright © 2010-2016. All Rights Reserved.