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 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 given message, through the chain, to the handler.
      Parameters:
      unitOfWork - The UnitOfWork the message is executed in
      interceptors - The interceptors composing the chain
      handler - The handler for the message
  • Method Details

    • proceed

      public Object proceed() throws Exception
      Description copied from interface: InterceptorChain
      Signals the Interceptor Chain to continue processing the message.
      Specified by:
      proceed in interface InterceptorChain
      Returns:
      The return value of the message processing
      Throws:
      Exception - any exceptions thrown by interceptors or the message handler