Class MethodInvokingCorrelationStrategy
java.lang.Object
org.springframework.integration.aggregator.MethodInvokingCorrelationStrategy
- All Implemented Interfaces:
org.springframework.beans.factory.Aware,org.springframework.beans.factory.BeanFactoryAware,org.springframework.context.Lifecycle,CorrelationStrategy,ManageableLifecycle
public class MethodInvokingCorrelationStrategy extends java.lang.Object implements CorrelationStrategy, org.springframework.beans.factory.BeanFactoryAware, ManageableLifecycle
CorrelationStrategy implementation that works as an adapter to another bean.-
Constructor Summary
Constructors Constructor Description MethodInvokingCorrelationStrategy(java.lang.Object object, java.lang.reflect.Method method)MethodInvokingCorrelationStrategy(java.lang.Object object, java.lang.String methodName) -
Method Summary
Modifier and Type Method Description java.lang.ObjectgetCorrelationKey(org.springframework.messaging.Message<?> message)Find the correlation key for the given message.booleanisRunning()voidsetBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory)voidstart()voidstop()
-
Constructor Details
-
MethodInvokingCorrelationStrategy
public MethodInvokingCorrelationStrategy(java.lang.Object object, java.lang.String methodName) -
MethodInvokingCorrelationStrategy
public MethodInvokingCorrelationStrategy(java.lang.Object object, java.lang.reflect.Method method)
-
-
Method Details
-
setBeanFactory
public void setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory) throws org.springframework.beans.BeansException- Specified by:
setBeanFactoryin interfaceorg.springframework.beans.factory.BeanFactoryAware- Throws:
org.springframework.beans.BeansException
-
getCorrelationKey
public java.lang.Object getCorrelationKey(org.springframework.messaging.Message<?> message)Description copied from interface:CorrelationStrategyFind the correlation key for the given message. If no key can be determined the strategy should not returnnull, but throw an exception.- Specified by:
getCorrelationKeyin interfaceCorrelationStrategy- Parameters:
message- The message.- Returns:
- The correlation key.
-
start
public void start()- Specified by:
startin interfaceorg.springframework.context.Lifecycle- Specified by:
startin interfaceManageableLifecycle
-
stop
public void stop()- Specified by:
stopin interfaceorg.springframework.context.Lifecycle- Specified by:
stopin interfaceManageableLifecycle
-
isRunning
public boolean isRunning()- Specified by:
isRunningin interfaceorg.springframework.context.Lifecycle- Specified by:
isRunningin interfaceManageableLifecycle
-