Class IntegrationContextUtils
java.lang.Object
org.springframework.integration.context.IntegrationContextUtils
Utility methods for accessing common integration components from the BeanFactory.
- Author:
- Mark Fisher, Josh Long, Artem Bilan, Gary Russell, Oleg Zhurakousky, Pierre Lakreb
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final longThe default timeout for blocking operations like send and receive messages.static final StringA string representation forDEFAULT_TIMEOUT, e.g.static final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic BeanDefinitiongetBeanDefinition(String name, ConfigurableListableBeanFactory beanFactory) Return aBeanDefinitionwith the given name, obtained from the givenBeanFactoryor one of its parents.static MessageChannelgetErrorChannel(BeanFactory beanFactory) static StandardEvaluationContextgetEvaluationContext(BeanFactory beanFactory) static IntegrationPropertiesgetIntegrationProperties(BeanFactory beanFactory) static MetadataStoregetMetadataStore(BeanFactory beanFactory) static TaskSchedulergetRequiredTaskScheduler(BeanFactory beanFactory) static SimpleEvaluationContextgetSimpleEvaluationContext(BeanFactory beanFactory) static TaskSchedulergetTaskScheduler(BeanFactory beanFactory)
-
Field Details
-
BASE_PACKAGE
- See Also:
-
TASK_SCHEDULER_BEAN_NAME
- See Also:
-
ERROR_CHANNEL_BEAN_NAME
- See Also:
-
NULL_CHANNEL_BEAN_NAME
- See Also:
-
ERROR_LOGGER_BEAN_NAME
- See Also:
-
METADATA_STORE_BEAN_NAME
- See Also:
-
CONVERTER_REGISTRAR_BEAN_NAME
- See Also:
-
INTEGRATION_EVALUATION_CONTEXT_BEAN_NAME
- See Also:
-
INTEGRATION_SIMPLE_EVALUATION_CONTEXT_BEAN_NAME
- See Also:
-
INTEGRATION_HEADER_CHANNEL_REGISTRY_BEAN_NAME
- See Also:
-
INTEGRATION_GLOBAL_PROPERTIES_BEAN_NAME
- See Also:
-
CHANNEL_INITIALIZER_BEAN_NAME
- See Also:
-
AUTO_CREATE_CHANNEL_CANDIDATES_BEAN_NAME
- See Also:
-
DEFAULT_CONFIGURING_POSTPROCESSOR_BEAN_NAME
- See Also:
-
MESSAGING_ANNOTATION_POSTPROCESSOR_NAME
- See Also:
-
PUBLISHER_ANNOTATION_POSTPROCESSOR_NAME
- See Also:
-
INTEGRATION_CONFIGURATION_POST_PROCESSOR_BEAN_NAME
- See Also:
-
INTEGRATION_MESSAGE_HISTORY_CONFIGURER_BEAN_NAME
- See Also:
-
INTEGRATION_DATATYPE_CHANNEL_MESSAGE_CONVERTER_BEAN_NAME
- See Also:
-
INTEGRATION_FIXED_SUBSCRIBER_CHANNEL_BPP_BEAN_NAME
- See Also:
-
GLOBAL_CHANNEL_INTERCEPTOR_PROCESSOR_BEAN_NAME
- See Also:
-
INTEGRATION_LIFECYCLE_ROLE_CONTROLLER
- See Also:
-
INTEGRATION_GRAPH_SERVER_BEAN_NAME
- See Also:
-
SPEL_PROPERTY_ACCESSOR_REGISTRAR_BEAN_NAME
- See Also:
-
ARGUMENT_RESOLVER_MESSAGE_CONVERTER_BEAN_NAME
- See Also:
-
MESSAGE_HANDLER_FACTORY_BEAN_NAME
- See Also:
-
LIST_MESSAGE_HANDLER_FACTORY_BEAN_NAME
- See Also:
-
CONTROL_BUS_COMMAND_REGISTRY_BEAN_NAME
- See Also:
-
APPLICATION_RUNNING_CONTROLLER_BEAN_NAME
- See Also:
-
DEFAULT_TIMEOUT
public static final long DEFAULT_TIMEOUTThe default timeout for blocking operations like send and receive messages.- Since:
- 6.1
- See Also:
-
DEFAULT_TIMEOUT_STRING
A string representation forDEFAULT_TIMEOUT, e.g. for annotation attributes.- Since:
- 6.1
- See Also:
-
-
Constructor Details
-
IntegrationContextUtils
public IntegrationContextUtils()
-
-
Method Details
-
getMetadataStore
- Parameters:
beanFactory- BeanFactory for lookup, must not be null.- Returns:
- The
MetadataStorebean whose name is "metadataStore".
-
getErrorChannel
- Parameters:
beanFactory- BeanFactory for lookup, must not be null.- Returns:
- The
MessageChannelbean whose name is "errorChannel".
-
getTaskScheduler
- Parameters:
beanFactory- BeanFactory for lookup, must not be null.- Returns:
- The
TaskSchedulerbean whose name is "taskScheduler" if available.
-
getRequiredTaskScheduler
- Parameters:
beanFactory- BeanFactory for lookup, must not be null.- Returns:
- The
TaskSchedulerbean whose name is "taskScheduler". - Throws:
IllegalStateException- if no such bean is available
-
getEvaluationContext
- Parameters:
beanFactory- BeanFactory for lookup, must not be null.- Returns:
- the instance of
StandardEvaluationContextbean whose name is "integrationEvaluationContext".
-
getSimpleEvaluationContext
- Parameters:
beanFactory- BeanFactory for lookup, must not be null.- Returns:
- the instance of
SimpleEvaluationContextbean whose name is "integrationSimpleEvaluationContext". - Since:
- 4.3.15
-
getIntegrationProperties
- Parameters:
beanFactory- The bean factory.- Returns:
- the global
INTEGRATION_GLOBAL_PROPERTIES_BEAN_NAMEbean from provided#beanFactory, which represents the merged properties values from all 'META-INF/spring.integration.properties'. Or user-definedIntegrationPropertiesbean. May return onlyIntegrationProperties.defaults()if there is noINTEGRATION_GLOBAL_PROPERTIES_BEAN_NAMEbean in the provided#beanFactoryor provided#beanFactoryis null.
-
getBeanDefinition
public static BeanDefinition getBeanDefinition(String name, ConfigurableListableBeanFactory beanFactory) Return aBeanDefinitionwith the given name, obtained from the givenBeanFactoryor one of its parents.- Parameters:
name- the bean name to returnbeanFactory- theConfigurableListableBeanFactoryto travers.- Returns:
- the
BeanDefinitionfor a given name - Throws:
NoSuchBeanDefinitionException- if aBeanDefinitionis not found- Since:
- 5.1.10
-