Package org.axonframework.common.annotation

Examples of org.axonframework.common.annotation.MethodMessageHandler


     * @throws Throwable any exception occurring while handling the command
     */
    @Override
    public Object handle(CommandMessage<Object> command, UnitOfWork unitOfWork) throws Throwable {
        try {
            final MethodMessageHandler handler = handlers.get(command.getCommandName());
            if (handler == null) {
                throw new NoHandlerForCommandException("No handler found for command " + command.getCommandName());
            }
            if (unitOfWork != null) {
                unitOfWork.attachResource(ParameterResolverFactory.class.getName(), parameterResolverFactory);
            }
            return handler.invoke(target, command);
        } catch (InvocationTargetException e) {
            throw e.getCause();
        }
    }
View Full Code Here

TOP

Related Classes of org.axonframework.common.annotation.MethodMessageHandler

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.