org.axonframework.commandhandling
Interface CommandHandler<T>

Type Parameters:
T - The type of command this handler can handle
All Known Implementing Classes:
AnnotationCommandHandlerAdapter

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

Method Summary
 Object handle(T command, UnitOfWork unitOfWork)
          Handles the given command.
 

Method Detail

handle

Object handle(T command,
              UnitOfWork unitOfWork)
              throws Throwable
Handles the given command.

Parameters:
command - 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 © 2011. All Rights Reserved.