Package org.axonframework.messaging
Class DefaultInterceptorChain<T extends Message<?>>
java.lang.Object
org.axonframework.messaging.DefaultInterceptorChain<T>
- Type Parameters:
T- The message type this interceptor chain can process
- All Implemented Interfaces:
InterceptorChain
public class DefaultInterceptorChain<T extends Message<?>>
extends Object
implements InterceptorChain
Mechanism that takes care of interceptor and handler execution.
- Since:
- 0.5
- Author:
- Allard Buijze
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultInterceptorChain(UnitOfWork<? extends T> unitOfWork, Iterable<? extends MessageHandlerInterceptor<? super T>> interceptors, MessageHandler<? super T> handler) Initialize the default interceptor chain to dispatch the givenmessage, through thechain, to thehandler. -
Method Summary
-
Constructor Details
-
DefaultInterceptorChain
public DefaultInterceptorChain(UnitOfWork<? extends T> unitOfWork, Iterable<? extends MessageHandlerInterceptor<? super T>> interceptors, MessageHandler<? super T> handler) Initialize the default interceptor chain to dispatch the givenmessage, through thechain, to thehandler.- Parameters:
unitOfWork- The UnitOfWork the message is executed ininterceptors- The interceptors composing the chainhandler- The handler for the message
-
-
Method Details
-
proceed
Description copied from interface:InterceptorChainSignals the Interceptor Chain to continue processing the message.- Specified by:
proceedin interfaceInterceptorChain- Returns:
- The return value of the message processing
- Throws:
Exception- any exceptions thrown by interceptors or the message handler
-