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 Object
implements CorrelationStrategy, org.springframework.beans.factory.BeanFactoryAware, ManageableLifecycle
CorrelationStrategy implementation that works as an adapter to another bean.-
Constructor Summary
ConstructorsConstructorDescriptionMethodInvokingCorrelationStrategy(Object object, Method method) MethodInvokingCorrelationStrategy(Object object, String methodName) -
Method Summary
Modifier and TypeMethodDescriptiongetCorrelationKey(org.springframework.messaging.Message<?> message) Find the correlation key for the given message.booleanvoidsetBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory) voidstart()voidstop()
-
Constructor Details
-
MethodInvokingCorrelationStrategy
-
MethodInvokingCorrelationStrategy
-
-
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
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
-