Class MultiCorrelationDataProvider
java.lang.Object
org.axonframework.messaging.core.correlation.MultiCorrelationDataProvider
- All Implemented Interfaces:
CorrelationDataProvider
A
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.0
- Author:
- Allard Buijze
-
Constructor Summary
ConstructorsConstructorDescriptionMultiCorrelationDataProvider(List<? extends CorrelationDataProvider> correlationDataProviders) Initialize aMultiCorrelationDataProvider, 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(@Nonnull List<? extends CorrelationDataProvider> correlationDataProviders) Initialize aMultiCorrelationDataProvider, delegating to givencorrelationDataProviders.- Parameters:
correlationDataProviders- TheCorrelationDataProvidersto 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.
-