Class SimpleCorrelationDataProvider
java.lang.Object
org.axonframework.messaging.correlation.SimpleCorrelationDataProvider
- All Implemented Interfaces:
CorrelationDataProvider
CorrelationDataProvider implementation defines correlation headers by the header names. The headers from messages
with these keys are returned as correlation data.
- Since:
- 2.3
- Author:
- Allard Buijze
-
Constructor Summary
ConstructorsConstructorDescriptionSimpleCorrelationDataProvider(String... metaDataKeys) Initializes the CorrelationDataProvider to return the meta data of messages with givenmetaDataKeysas correlation data. -
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
-
SimpleCorrelationDataProvider
Initializes the CorrelationDataProvider to return the meta data of messages with givenmetaDataKeysas correlation data.- Parameters:
metaDataKeys- The keys of the meta data entries from messages to return as correlation data
-
-
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
-