Class IntegrationManagementConfigurer
java.lang.Object
org.springframework.integration.config.IntegrationManagementConfigurer
- All Implemented Interfaces:
java.util.EventListener
,org.springframework.beans.factory.Aware
,org.springframework.beans.factory.BeanNameAware
,org.springframework.beans.factory.config.BeanPostProcessor
,org.springframework.beans.factory.SmartInitializingSingleton
,org.springframework.context.ApplicationContextAware
,org.springframework.context.ApplicationListener<org.springframework.context.event.ContextClosedEvent>
public class IntegrationManagementConfigurer
extends java.lang.Object
implements org.springframework.beans.factory.SmartInitializingSingleton, org.springframework.context.ApplicationContextAware, org.springframework.beans.factory.BeanNameAware, org.springframework.beans.factory.config.BeanPostProcessor, org.springframework.context.ApplicationListener<org.springframework.context.event.ContextClosedEvent>
Configures beans that implement
IntegrationManagement
.
Configures counts, stats, logging for all (or selected) components.- Since:
- 4.2
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
MANAGEMENT_CONFIGURER_NAME
Bean name of the configurer. -
Constructor Summary
Constructors Constructor Description IntegrationManagementConfigurer()
-
Method Summary
Modifier and Type Method Description void
afterSingletonsInstantiated()
void
onApplicationEvent(org.springframework.context.event.ContextClosedEvent event)
java.lang.Object
postProcessAfterInitialization(java.lang.Object bean, java.lang.String name)
void
setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
void
setBeanName(java.lang.String name)
void
setDefaultLoggingEnabled(boolean defaultLoggingEnabled)
Disable all logging in the normal message flow in framework components.void
setMetricsCaptor(MetricsCaptor metricsCaptor)
-
Field Details
-
MANAGEMENT_CONFIGURER_NAME
public static final java.lang.String MANAGEMENT_CONFIGURER_NAMEBean name of the configurer.- See Also:
- Constant Field Values
-
-
Constructor Details
-
IntegrationManagementConfigurer
public IntegrationManagementConfigurer()
-
-
Method Details
-
setApplicationContext
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) throws org.springframework.beans.BeansException- Specified by:
setApplicationContext
in interfaceorg.springframework.context.ApplicationContextAware
- Throws:
org.springframework.beans.BeansException
-
setBeanName
public void setBeanName(java.lang.String name)- Specified by:
setBeanName
in interfaceorg.springframework.beans.factory.BeanNameAware
-
setDefaultLoggingEnabled
public void setDefaultLoggingEnabled(boolean defaultLoggingEnabled)Disable all logging in the normal message flow in framework components. When 'false', such logging will be skipped, regardless of logging level. When 'true', the logging is controlled as normal by the logging subsystem log level configuration.Exception logging (debug or otherwise) is not affected by this setting.
It has been found that in high-volume messaging environments, calls to methods such as
Log.isDebugEnabled()
can be quite expensive and account for an inordinate amount of CPU time.Set this to false to disable logging by default in all framework components that implement
IntegrationManagement
(channels, message handlers etc). This turns off logging such as "PreSend on channel", "Received message" etc.After the context is initialized, individual components can have their setting changed by invoking
IntegrationManagement.setLoggingEnabled(boolean)
.- Parameters:
defaultLoggingEnabled
- defaults to true.
-
setMetricsCaptor
-
afterSingletonsInstantiated
public void afterSingletonsInstantiated()- Specified by:
afterSingletonsInstantiated
in interfaceorg.springframework.beans.factory.SmartInitializingSingleton
-
postProcessAfterInitialization
public java.lang.Object postProcessAfterInitialization(java.lang.Object bean, java.lang.String name) throws org.springframework.beans.BeansException- Specified by:
postProcessAfterInitialization
in interfaceorg.springframework.beans.factory.config.BeanPostProcessor
- Throws:
org.springframework.beans.BeansException
-
onApplicationEvent
public void onApplicationEvent(org.springframework.context.event.ContextClosedEvent event)- Specified by:
onApplicationEvent
in interfaceorg.springframework.context.ApplicationListener<org.springframework.context.event.ContextClosedEvent>
-