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.
- Author:
- Mark Fisher, Josh Long, Artem Bilan, Gary Russell, Oleg Zhurakousky, Pierre Lakreb
-
Field Summary
-
Constructor Summary
Constructors Constructor Description IntegrationContextUtils()
-
Method Summary
Modifier and Type Method Description static BeanDefinition
getBeanDefinition(String name, ConfigurableListableBeanFactory beanFactory)
Return aBeanDefinition
with the given name, obtained from the givenBeanFactory
or one of its parents.static MessageChannel
getErrorChannel(BeanFactory beanFactory)
static StandardEvaluationContext
getEvaluationContext(BeanFactory beanFactory)
static Properties
getIntegrationProperties(BeanFactory beanFactory)
static MetadataStore
getMetadataStore(BeanFactory beanFactory)
static TaskScheduler
getRequiredTaskScheduler(BeanFactory beanFactory)
static SimpleEvaluationContext
getSimpleEvaluationContext(BeanFactory beanFactory)
static TaskScheduler
getTaskScheduler(BeanFactory beanFactory)
-
Field Details
-
TASK_SCHEDULER_BEAN_NAME
- See Also:
- Constant Field Values
-
ERROR_CHANNEL_BEAN_NAME
- See Also:
- Constant Field Values
-
NULL_CHANNEL_BEAN_NAME
- See Also:
- Constant Field Values
-
ERROR_LOGGER_BEAN_NAME
- See Also:
- Constant Field Values
-
METADATA_STORE_BEAN_NAME
- See Also:
- Constant Field Values
-
CONVERTER_REGISTRAR_BEAN_NAME
- See Also:
- Constant Field Values
-
INTEGRATION_EVALUATION_CONTEXT_BEAN_NAME
- See Also:
- Constant Field Values
-
INTEGRATION_SIMPLE_EVALUATION_CONTEXT_BEAN_NAME
- See Also:
- Constant Field Values
-
INTEGRATION_HEADER_CHANNEL_REGISTRY_BEAN_NAME
- See Also:
- Constant Field Values
-
INTEGRATION_GLOBAL_PROPERTIES_BEAN_NAME
- See Also:
- Constant Field Values
-
MERGED_INTEGRATION_GLOBAL_PROPERTIES_BEAN_NAME
- See Also:
- Constant Field Values
-
CHANNEL_INITIALIZER_BEAN_NAME
- See Also:
- Constant Field Values
-
AUTO_CREATE_CHANNEL_CANDIDATES_BEAN_NAME
- See Also:
- Constant Field Values
-
DEFAULT_CONFIGURING_POSTPROCESSOR_BEAN_NAME
- See Also:
- Constant Field Values
-
MESSAGING_ANNOTATION_POSTPROCESSOR_NAME
- See Also:
- Constant Field Values
-
PUBLISHER_ANNOTATION_POSTPROCESSOR_NAME
- See Also:
- Constant Field Values
-
INTEGRATION_CONFIGURATION_POST_PROCESSOR_BEAN_NAME
- See Also:
- Constant Field Values
-
INTEGRATION_MESSAGE_HISTORY_CONFIGURER_BEAN_NAME
- See Also:
- Constant Field Values
-
INTEGRATION_DATATYPE_CHANNEL_MESSAGE_CONVERTER_BEAN_NAME
- See Also:
- Constant Field Values
-
INTEGRATION_FIXED_SUBSCRIBER_CHANNEL_BPP_BEAN_NAME
- See Also:
- Constant Field Values
-
GLOBAL_CHANNEL_INTERCEPTOR_PROCESSOR_BEAN_NAME
- See Also:
- Constant Field Values
-
JSON_NODE_WRAPPER_TO_JSON_NODE_CONVERTER
- See Also:
- Constant Field Values
-
INTEGRATION_LIFECYCLE_ROLE_CONTROLLER
- See Also:
- Constant Field Values
-
INTEGRATION_GRAPH_SERVER_BEAN_NAME
- See Also:
- Constant Field Values
-
SPEL_PROPERTY_ACCESSOR_REGISTRAR_BEAN_NAME
- See Also:
- Constant Field Values
-
ARGUMENT_RESOLVER_MESSAGE_CONVERTER_BEAN_NAME
- See Also:
- Constant Field Values
-
DISPOSABLES_BEAN_NAME
- See Also:
- Constant Field Values
-
MESSAGE_HANDLER_FACTORY_BEAN_NAME
- See Also:
- Constant Field Values
-
LIST_MESSAGE_HANDLER_FACTORY_BEAN_NAME
- See Also:
- Constant Field Values
-
-
Constructor Details
-
IntegrationContextUtils
public IntegrationContextUtils()
-
-
Method Details
-
getMetadataStore
- Parameters:
beanFactory
- BeanFactory for lookup, must not be null.- Returns:
- The
MetadataStore
bean whose name is "metadataStore".
-
getErrorChannel
- Parameters:
beanFactory
- BeanFactory for lookup, must not be null.- Returns:
- The
MessageChannel
bean whose name is "errorChannel".
-
getTaskScheduler
- Parameters:
beanFactory
- BeanFactory for lookup, must not be null.- Returns:
- The
TaskScheduler
bean whose name is "taskScheduler" if available.
-
getRequiredTaskScheduler
- 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
- Parameters:
beanFactory
- BeanFactory for lookup, must not be null.- Returns:
- the instance of
StandardEvaluationContext
bean whose name is "integrationEvaluationContext".
-
getSimpleEvaluationContext
- Parameters:
beanFactory
- BeanFactory for lookup, must not be null.- Returns:
- the instance of
SimpleEvaluationContext
bean whose name is "integrationSimpleEvaluationContext". - Since:
- 4.3.15
-
getIntegrationProperties
- 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-definedIntegrationProperties
bean. May return onlyIntegrationProperties.defaults()
if there is noINTEGRATION_GLOBAL_PROPERTIES_BEAN_NAME
bean in the provided#beanFactory
or provided#beanFactory
is null.
-
getBeanDefinition
public static BeanDefinition getBeanDefinition(String name, ConfigurableListableBeanFactory beanFactory)Return aBeanDefinition
with the given name, obtained from the givenBeanFactory
or one of its parents.- Parameters:
name
- the bean name to returnbeanFactory
- theConfigurableListableBeanFactory
to travers.- Returns:
- the
BeanDefinition
for a given name - Throws:
NoSuchBeanDefinitionException
- if aBeanDefinition
is not found- Since:
- 5.1.10
-