Class MultiCorrelationDataProvider<T extends Message>
java.lang.Object
org.axonframework.messaging.correlation.MultiCorrelationDataProvider<T>
- All Implemented Interfaces:
CorrelationDataProvider
public class MultiCorrelationDataProvider<T extends Message>
extends Object
implements CorrelationDataProvider
CorrelationDataProvider that combines the data of multiple other correlation providers. When multiple instance
provide the same keys, a delegate will override the entries provided by previously resolved delegates.
- Since:
- 2.3
- Author:
- Allard Buijze
-
Constructor Summary
ConstructorsConstructorDescriptionMultiCorrelationDataProvider(List<? extends CorrelationDataProvider> correlationDataProviders) Initialize the correlation data provider, delegating to givencorrelationDataProviders. -
Method Summary
Modifier and TypeMethodDescriptioncorrelationDataFor(Message<?> message) Provides a map with the entries to attach as correlation data to generated messages while processing givenmessage.
-
Constructor Details
-
MultiCorrelationDataProvider
public MultiCorrelationDataProvider(List<? extends CorrelationDataProvider> correlationDataProviders) Initialize the correlation data provider, delegating to givencorrelationDataProviders.- Parameters:
correlationDataProviders- the providers to delegate to.
-
-
Method Details
-
correlationDataFor
Description copied from interface:CorrelationDataProviderProvides a map with the entries to attach as correlation data to generated messages while processing givenmessage. This method should not returnnull. Any exception thrown from this method might interfere with rolling back a transaction. Therefore, by default exceptions are caught, ignoring the correlation data that should have been added.- Specified by:
correlationDataForin interfaceCorrelationDataProvider- Parameters:
message- The message to define correlation data for- Returns:
- the data to attach as correlation data to generated messages
-