T- The message type this interceptor can process
public interface MessageHandlerInterceptor<T extends Message<?>>
|Modifier and Type||Method and Description|
Invoked before a Message is handled by a designated
Object handle(@Nonnull UnitOfWork<? extends T> unitOfWork, @Nonnull InterceptorChain interceptorChain) throws Exception
MessageHandler. The interceptor is responsible for the continuation of the handling process by invoking the
InterceptorChain.proceed()method on the given
interceptorChain. The given
unitOfWorkcontains contextual information. Any information gathered by interceptors may be attached to the unitOfWork. Interceptors are highly recommended not to change the type of the message handling result, as the dispatching component might expect a result of a specific type.
unitOfWork- The UnitOfWork that is processing the message
interceptorChain- The interceptor chain that allows this interceptor to proceed the dispatch process
Exception- any exception that occurs while handling the message
Copyright © 2010–2023. All rights reserved.