Class NoMoreInterceptors<T>
java.lang.Object
org.axonframework.messaging.annotation.NoMoreInterceptors<T>
- Type Parameters:
T- the type of the handlers
- All Implemented Interfaces:
MessageHandlerInterceptorMemberChain<T>
public class NoMoreInterceptors<T>
extends Object
implements MessageHandlerInterceptorMemberChain<T>
This will implement
MessageHandlerInterceptorMemberChain with no more interceptors. It can be used a default
interceptor, for example in the AnnotatedHandlerInspector.- Since:
- 4.8.0
- Author:
- Gerard Klijs
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionhandle(Message<?> message, T target, MessageHandlingMember<? super T> handler) Handle the givenmessageby passing it through the interceptors and ultimately to the givenhandleron the giventargetinstance.static <T> MessageHandlerInterceptorMemberChain<T> instance()Creates and returns a new instance
-
Constructor Details
-
NoMoreInterceptors
public NoMoreInterceptors()
-
-
Method Details
-
instance
Creates and returns a new instance- Type Parameters:
T- the type of the handlers- Returns:
- a new
NoMoreInterceptorsinstance
-
handle
public Object handle(@Nonnull Message<?> message, @Nonnull T target, @Nonnull MessageHandlingMember<? super T> handler) throws Exception Description copied from interface:MessageHandlerInterceptorMemberChainHandle the givenmessageby passing it through the interceptors and ultimately to the givenhandleron the giventargetinstance. The result of this invocation is the result as given by thehandler, possibly modified by any of the interceptors in this chain.- Specified by:
handlein interfaceMessageHandlerInterceptorMemberChain<T>- Parameters:
message- The message to pass through the interceptor chaintarget- The target instance to invoke the interceptors and handlers onhandler- The actual handler to invoke once all interceptors have received the message- Returns:
- the result as returned by the handlers or interceptors
- Throws:
Exception- any exception thrown by the handler or any of the interceptors
-