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 Details

    • MethodInvokingCorrelationStrategy

      public MethodInvokingCorrelationStrategy(Object object, String methodName)
    • MethodInvokingCorrelationStrategy

      public MethodInvokingCorrelationStrategy(Object object, Method method)
  • Method Details

    • setBeanFactory

      public void setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory) throws org.springframework.beans.BeansException
      Specified by:
      setBeanFactory in interface org.springframework.beans.factory.BeanFactoryAware
      Throws:
      org.springframework.beans.BeansException
    • getCorrelationKey

      public 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 return null, but throw an exception.
      Specified by:
      getCorrelationKey in interface CorrelationStrategy
      Parameters:
      message - The message.
      Returns:
      The correlation key.
    • start

      public void start()
      Specified by:
      start in interface org.springframework.context.Lifecycle
      Specified by:
      start in interface ManageableLifecycle
    • stop

      public void stop()
      Specified by:
      stop in interface org.springframework.context.Lifecycle
      Specified by:
      stop in interface ManageableLifecycle
    • isRunning

      public boolean isRunning()
      Specified by:
      isRunning in interface org.springframework.context.Lifecycle
      Specified by:
      isRunning in interface ManageableLifecycle