T
- The type of Message that can be interceptedpublic class CorrelationDataInterceptor<T extends Message<?>> extends Object implements MessageHandlerInterceptor<T>
CorrelationDataProviders
with the Unit of Work.
The registered CorrelationDataProviders copy correlation MetaData over from the Message processed by the Unit of Work
to new Messages that are created during processing.Constructor and Description |
---|
CorrelationDataInterceptor(Collection<CorrelationDataProvider> correlationDataProviders)
Initializes the interceptor that registers given
correlationDataProviders with the current Unit of Work. |
CorrelationDataInterceptor(CorrelationDataProvider... correlationDataProviders)
Initializes the interceptor that registers given
correlationDataProviders with the current Unit of Work. |
Modifier and Type | Method and Description |
---|---|
Object |
handle(UnitOfWork<? extends T> unitOfWork,
InterceptorChain interceptorChain)
Invoked before a Message is handled by a designated
MessageHandler . |
public CorrelationDataInterceptor(CorrelationDataProvider... correlationDataProviders)
correlationDataProviders
with the current Unit of Work.correlationDataProviders
- The CorrelationDataProviders to register with the Interceptorpublic CorrelationDataInterceptor(Collection<CorrelationDataProvider> correlationDataProviders)
correlationDataProviders
with the current Unit of Work.correlationDataProviders
- The CorrelationDataProviders to register with the Interceptorpublic Object handle(@Nonnull UnitOfWork<? extends T> unitOfWork, @Nonnull InterceptorChain interceptorChain) throws Exception
MessageHandlerInterceptor
MessageHandler
.
The interceptor is responsible for the continuation of the handling process by invoking the InterceptorChain.proceed()
method on the given interceptorChain
.
The given unitOfWork
contains 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.handle
in interface MessageHandlerInterceptor<T extends Message<?>>
unitOfWork
- The UnitOfWork that is processing the messageinterceptorChain
- The interceptor chain that allows this interceptor to proceed the dispatch processException
- any exception that occurs while handling the messageCopyright © 2010–2024. All rights reserved.