org.axonframework.quickstart.handler
Class CreateToDoCommandHandler

java.lang.Object
  extended by org.axonframework.quickstart.handler.CreateToDoCommandHandler
All Implemented Interfaces:
CommandHandler<CreateToDoItemCommand>

public class CreateToDoCommandHandler
extends Object
implements CommandHandler<CreateToDoItemCommand>

Author:
Jettro Coenradie

Constructor Summary
CreateToDoCommandHandler(Repository<ToDoItem> repository)
           
 
Method Summary
 Object handle(CommandMessage<CreateToDoItemCommand> commandMessage, UnitOfWork unitOfWork)
          Handles the given command.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CreateToDoCommandHandler

public CreateToDoCommandHandler(Repository<ToDoItem> repository)
Method Detail

handle

public Object handle(CommandMessage<CreateToDoItemCommand> commandMessage,
                     UnitOfWork unitOfWork)
              throws Throwable
Description copied from interface: CommandHandler
Handles the given command.

Specified by:
handle in interface CommandHandler<CreateToDoItemCommand>
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.