Example usage for org.springframework.integration.context IntegrationProperties READ_ONLY_HEADERS

List of usage examples for org.springframework.integration.context IntegrationProperties READ_ONLY_HEADERS

Introduction

In this page you can find the example usage for org.springframework.integration.context IntegrationProperties READ_ONLY_HEADERS.

Prototype

String READ_ONLY_HEADERS

To view the source code for org.springframework.integration.context IntegrationProperties READ_ONLY_HEADERS.

Click Source Link

Document

Specifies the value of org.springframework.integration.support.DefaultMessageBuilderFactory#readOnlyHeaders .

Usage

From source file:org.springframework.integration.config.IntegrationRegistrar.java

private void registerMessageBuilderFactory(BeanDefinitionRegistry registry) {
    boolean alreadyRegistered = false;
    if (registry instanceof ListableBeanFactory) {
        alreadyRegistered = ((ListableBeanFactory) registry)
                .containsBean(IntegrationUtils.INTEGRATION_MESSAGE_BUILDER_FACTORY_BEAN_NAME);
    } else {/*from w  w  w.j  a v a  2  s.  c o m*/
        alreadyRegistered = registry
                .isBeanNameInUse(IntegrationUtils.INTEGRATION_MESSAGE_BUILDER_FACTORY_BEAN_NAME);
    }
    if (!alreadyRegistered) {
        BeanDefinitionBuilder mbfBuilder = BeanDefinitionBuilder
                .genericBeanDefinition(DefaultMessageBuilderFactory.class).addPropertyValue("readOnlyHeaders",
                        IntegrationProperties.getExpressionFor(IntegrationProperties.READ_ONLY_HEADERS));
        registry.registerBeanDefinition(IntegrationUtils.INTEGRATION_MESSAGE_BUILDER_FACTORY_BEAN_NAME,
                mbfBuilder.getBeanDefinition());
    }

}