Class MethodInvokingCorrelationStrategy
java.lang.Object
org.springframework.integration.aggregator.MethodInvokingCorrelationStrategy
- All Implemented Interfaces:
Aware
,BeanFactoryAware
,Lifecycle
,CorrelationStrategy
,ManageableLifecycle
public class MethodInvokingCorrelationStrategy
extends Object
implements CorrelationStrategy, BeanFactoryAware, ManageableLifecycle
CorrelationStrategy
implementation that works as an adapter to another bean.- Author:
- Marius Bogoevici, Dave Syer, Artem Bilan, Gary Russell
-
Constructor Summary
ConstructorDescriptionMethodInvokingCorrelationStrategy
(Object object, Method method) MethodInvokingCorrelationStrategy
(Object object, String methodName) -
Method Summary
Modifier and TypeMethodDescriptiongetCorrelationKey
(Message<?> message) Find the correlation key for the given message.boolean
void
setBeanFactory
(BeanFactory beanFactory) void
start()
void
stop()
-
Constructor Details
-
MethodInvokingCorrelationStrategy
-
MethodInvokingCorrelationStrategy
-
-
Method Details
-
setBeanFactory
- Specified by:
setBeanFactory
in interfaceBeanFactoryAware
- Throws:
BeansException
-
getCorrelationKey
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.
-
start
public void start()- Specified by:
start
in interfaceLifecycle
- Specified by:
start
in interfaceManageableLifecycle
-
stop
public void stop()- Specified by:
stop
in interfaceLifecycle
- Specified by:
stop
in interfaceManageableLifecycle
-
isRunning
public boolean isRunning()- Specified by:
isRunning
in interfaceLifecycle
- Specified by:
isRunning
in interfaceManageableLifecycle
-