Class IntegrationContextUtils

java.lang.Object
org.springframework.integration.context.IntegrationContextUtils

public abstract class IntegrationContextUtils extends Object
Utility methods for accessing common integration components from the BeanFactory.
  • Field Details

    • BASE_PACKAGE

      public static final String BASE_PACKAGE
      See Also:
    • TASK_SCHEDULER_BEAN_NAME

      public static final String TASK_SCHEDULER_BEAN_NAME
      See Also:
    • ERROR_CHANNEL_BEAN_NAME

      public static final String ERROR_CHANNEL_BEAN_NAME
      See Also:
    • NULL_CHANNEL_BEAN_NAME

      public static final String NULL_CHANNEL_BEAN_NAME
      See Also:
    • ERROR_LOGGER_BEAN_NAME

      public static final String ERROR_LOGGER_BEAN_NAME
      See Also:
    • METADATA_STORE_BEAN_NAME

      public static final String METADATA_STORE_BEAN_NAME
      See Also:
    • CONVERTER_REGISTRAR_BEAN_NAME

      public static final String CONVERTER_REGISTRAR_BEAN_NAME
      See Also:
    • INTEGRATION_EVALUATION_CONTEXT_BEAN_NAME

      public static final String INTEGRATION_EVALUATION_CONTEXT_BEAN_NAME
      See Also:
    • INTEGRATION_SIMPLE_EVALUATION_CONTEXT_BEAN_NAME

      public static final String INTEGRATION_SIMPLE_EVALUATION_CONTEXT_BEAN_NAME
      See Also:
    • INTEGRATION_HEADER_CHANNEL_REGISTRY_BEAN_NAME

      public static final String INTEGRATION_HEADER_CHANNEL_REGISTRY_BEAN_NAME
      See Also:
    • INTEGRATION_GLOBAL_PROPERTIES_BEAN_NAME

      public static final String INTEGRATION_GLOBAL_PROPERTIES_BEAN_NAME
      See Also:
    • CHANNEL_INITIALIZER_BEAN_NAME

      public static final String CHANNEL_INITIALIZER_BEAN_NAME
      See Also:
    • AUTO_CREATE_CHANNEL_CANDIDATES_BEAN_NAME

      public static final String AUTO_CREATE_CHANNEL_CANDIDATES_BEAN_NAME
      See Also:
    • DEFAULT_CONFIGURING_POSTPROCESSOR_BEAN_NAME

      public static final String DEFAULT_CONFIGURING_POSTPROCESSOR_BEAN_NAME
      See Also:
    • MESSAGING_ANNOTATION_POSTPROCESSOR_NAME

      public static final String MESSAGING_ANNOTATION_POSTPROCESSOR_NAME
      See Also:
    • PUBLISHER_ANNOTATION_POSTPROCESSOR_NAME

      public static final String PUBLISHER_ANNOTATION_POSTPROCESSOR_NAME
      See Also:
    • INTEGRATION_CONFIGURATION_POST_PROCESSOR_BEAN_NAME

      public static final String INTEGRATION_CONFIGURATION_POST_PROCESSOR_BEAN_NAME
      See Also:
    • INTEGRATION_MESSAGE_HISTORY_CONFIGURER_BEAN_NAME

      public static final String INTEGRATION_MESSAGE_HISTORY_CONFIGURER_BEAN_NAME
      See Also:
    • INTEGRATION_DATATYPE_CHANNEL_MESSAGE_CONVERTER_BEAN_NAME

      public static final String INTEGRATION_DATATYPE_CHANNEL_MESSAGE_CONVERTER_BEAN_NAME
      See Also:
    • INTEGRATION_FIXED_SUBSCRIBER_CHANNEL_BPP_BEAN_NAME

      public static final String INTEGRATION_FIXED_SUBSCRIBER_CHANNEL_BPP_BEAN_NAME
      See Also:
    • GLOBAL_CHANNEL_INTERCEPTOR_PROCESSOR_BEAN_NAME

      public static final String GLOBAL_CHANNEL_INTERCEPTOR_PROCESSOR_BEAN_NAME
      See Also:
    • JSON_NODE_WRAPPER_TO_JSON_NODE_CONVERTER

      public static final String JSON_NODE_WRAPPER_TO_JSON_NODE_CONVERTER
      See Also:
    • INTEGRATION_LIFECYCLE_ROLE_CONTROLLER

      public static final String INTEGRATION_LIFECYCLE_ROLE_CONTROLLER
      See Also:
    • INTEGRATION_GRAPH_SERVER_BEAN_NAME

      public static final String INTEGRATION_GRAPH_SERVER_BEAN_NAME
      See Also:
    • SPEL_PROPERTY_ACCESSOR_REGISTRAR_BEAN_NAME

      public static final String SPEL_PROPERTY_ACCESSOR_REGISTRAR_BEAN_NAME
      See Also:
    • ARGUMENT_RESOLVER_MESSAGE_CONVERTER_BEAN_NAME

      public static final String ARGUMENT_RESOLVER_MESSAGE_CONVERTER_BEAN_NAME
      See Also:
    • MESSAGE_HANDLER_FACTORY_BEAN_NAME

      public static final String MESSAGE_HANDLER_FACTORY_BEAN_NAME
      See Also:
    • LIST_MESSAGE_HANDLER_FACTORY_BEAN_NAME

      public static final String LIST_MESSAGE_HANDLER_FACTORY_BEAN_NAME
      See Also:
  • Constructor Details

    • IntegrationContextUtils

      public IntegrationContextUtils()
  • Method Details

    • getMetadataStore

      public static MetadataStore getMetadataStore(org.springframework.beans.factory.BeanFactory beanFactory)
      Parameters:
      beanFactory - BeanFactory for lookup, must not be null.
      Returns:
      The MetadataStore bean whose name is "metadataStore".
    • getErrorChannel

      public static org.springframework.messaging.MessageChannel getErrorChannel(org.springframework.beans.factory.BeanFactory beanFactory)
      Parameters:
      beanFactory - BeanFactory for lookup, must not be null.
      Returns:
      The MessageChannel bean whose name is "errorChannel".
    • getTaskScheduler

      public static org.springframework.scheduling.TaskScheduler getTaskScheduler(org.springframework.beans.factory.BeanFactory beanFactory)
      Parameters:
      beanFactory - BeanFactory for lookup, must not be null.
      Returns:
      The TaskScheduler bean whose name is "taskScheduler" if available.
    • getRequiredTaskScheduler

      public static org.springframework.scheduling.TaskScheduler getRequiredTaskScheduler(org.springframework.beans.factory.BeanFactory beanFactory)
      Parameters:
      beanFactory - BeanFactory for lookup, must not be null.
      Returns:
      The TaskScheduler bean whose name is "taskScheduler".
      Throws:
      IllegalStateException - if no such bean is available
    • getEvaluationContext

      public static org.springframework.expression.spel.support.StandardEvaluationContext getEvaluationContext(org.springframework.beans.factory.BeanFactory beanFactory)
      Parameters:
      beanFactory - BeanFactory for lookup, must not be null.
      Returns:
      the instance of StandardEvaluationContext bean whose name is "integrationEvaluationContext".
    • getSimpleEvaluationContext

      public static org.springframework.expression.spel.support.SimpleEvaluationContext getSimpleEvaluationContext(org.springframework.beans.factory.BeanFactory beanFactory)
      Parameters:
      beanFactory - BeanFactory for lookup, must not be null.
      Returns:
      the instance of SimpleEvaluationContext bean whose name is "integrationSimpleEvaluationContext".
      Since:
      4.3.15
    • getIntegrationProperties

      public static IntegrationProperties getIntegrationProperties(org.springframework.beans.factory.BeanFactory beanFactory)
      Parameters:
      beanFactory - The bean factory.
      Returns:
      the global INTEGRATION_GLOBAL_PROPERTIES_BEAN_NAME bean from provided #beanFactory, which represents the merged properties values from all 'META-INF/spring.integration.properties'. Or user-defined IntegrationProperties bean. May return only IntegrationProperties.defaults() if there is no INTEGRATION_GLOBAL_PROPERTIES_BEAN_NAME bean in the provided #beanFactory or provided #beanFactory is null.
    • getBeanDefinition

      public static org.springframework.beans.factory.config.BeanDefinition getBeanDefinition(String name, org.springframework.beans.factory.config.ConfigurableListableBeanFactory beanFactory)
      Return a BeanDefinition with the given name, obtained from the given BeanFactory or one of its parents.
      Parameters:
      name - the bean name to return
      beanFactory - the ConfigurableListableBeanFactory to travers.
      Returns:
      the BeanDefinition for a given name
      Throws:
      org.springframework.beans.factory.NoSuchBeanDefinitionException - if a BeanDefinition is not found
      Since:
      5.1.10