Class HeaderAttributeCorrelationStrategy
java.lang.Object
org.springframework.integration.aggregator.HeaderAttributeCorrelationStrategy
- All Implemented Interfaces:
CorrelationStrategy
public class HeaderAttributeCorrelationStrategy extends java.lang.Object implements CorrelationStrategy
Default implementation of
CorrelationStrategy
.
Uses a provided header attribute to determine the correlation key value.-
Constructor Summary
Constructors Constructor Description HeaderAttributeCorrelationStrategy(java.lang.String attributeName)
-
Method Summary
Modifier and Type Method Description java.lang.Object
getCorrelationKey(org.springframework.messaging.Message<?> message)
Find the correlation key for the given message.
-
Constructor Details
-
HeaderAttributeCorrelationStrategy
public HeaderAttributeCorrelationStrategy(java.lang.String attributeName)
-
-
Method Details
-
getCorrelationKey
public java.lang.Object getCorrelationKey(org.springframework.messaging.Message<?> message)Description copied from interface:CorrelationStrategy
Find the correlation key for the given message. If no key can be determined the strategy should not returnnull
, but throw an exception.- Specified by:
getCorrelationKey
in interfaceCorrelationStrategy
- Parameters:
message
- The message.- Returns:
- The correlation key.
-