org.axonframework.commandhandling
Class DefaultInterceptorChain

java.lang.Object
  extended by org.axonframework.commandhandling.DefaultInterceptorChain
All Implemented Interfaces:
InterceptorChain

public class DefaultInterceptorChain
extends Object
implements InterceptorChain

Mechanism that takes care of interceptor and event handler execution.

Since:
0.5
Author:
Allard Buijze

Constructor Summary
DefaultInterceptorChain(CommandMessage<?> command, UnitOfWork unitOfWork, CommandHandler<?> handler, Iterable<? extends CommandHandlerInterceptor> chain)
          Initialize the default interceptor chain to dispatch the given command, through the chain, to the handler.
 
Method Summary
 Object proceed()
          Signals the Interceptor Chain to continue processing the incoming (original) command.
 Object proceed(CommandMessage<?> commandProceedWith)
          Signals the Interceptor Chain to continue processing the given command.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultInterceptorChain

public DefaultInterceptorChain(CommandMessage<?> command,
                               UnitOfWork unitOfWork,
                               CommandHandler<?> handler,
                               Iterable<? extends CommandHandlerInterceptor> chain)
Initialize the default interceptor chain to dispatch the given command, through the chain, to the handler.

Parameters:
command - The command to dispatch through the interceptor chain
unitOfWork - The UnitOfWork the command is executed in
handler - The handler for the command
chain - The interceptor composing the chain
Method Detail

proceed

public Object proceed(CommandMessage<?> commandProceedWith)
               throws Throwable
Signals the Interceptor Chain to continue processing the given command.

Specified by:
proceed in interface InterceptorChain
Parameters:
commandProceedWith - The command being executed
Returns:
The return value of the command execution, if any
Throws:
Throwable - any exceptions thrown by interceptors or the command handler

proceed

public Object proceed()
               throws Throwable
Description copied from interface: InterceptorChain
Signals the Interceptor Chain to continue processing the incoming (original) command.

Specified by:
proceed in interface InterceptorChain
Returns:
The return value of the command execution, if any
Throws:
Throwable - any exceptions thrown by interceptors or the command handler


Copyright © 2010-2016. All Rights Reserved.