List of usage examples for org.springframework.integration.config.xml IntegrationNamespaceUtils ORDER
String ORDER
To view the source code for org.springframework.integration.config.xml IntegrationNamespaceUtils ORDER.
Click Source Link
From source file:org.springframework.integration.config.xml.ChainParser.java
private void validateChild(Element element, ParserContext parserContext) { final Object source = parserContext.extractSource(element); final String order = element.getAttribute(IntegrationNamespaceUtils.ORDER); if (StringUtils.hasText(order)) { parserContext.getReaderContext().error(IntegrationNamespaceUtils.createElementDescription(element) + " must not define " + "an 'order' attribute when used within a chain.", source); }//from ww w . j a va2 s . c o m final List<Element> pollerChildElements = DomUtils.getChildElementsByTagName(element, "poller"); if (!pollerChildElements.isEmpty()) { parserContext.getReaderContext().error(IntegrationNamespaceUtils.createElementDescription(element) + " must not define " + "a 'poller' sub-element when used within a chain.", source); } }
From source file:org.springframework.integration.http.config.HttpIntegrationConfigurationInitializer.java
/** * Registers an {@link IntegrationRequestMappingHandlerMapping} * which could also be overridden by the user by simply registering * a {@link IntegrationRequestMappingHandlerMapping} {@code <bean>} with 'id' * {@link HttpContextUtils#HANDLER_MAPPING_BEAN_NAME}. * <p>//w w w . j av a2 s .c o m * In addition, checks if the {@code javax.servlet.Servlet} class is present on the classpath. * When Spring Integration HTTP is used only as an HTTP client, there is no reason to use and register * the HTTP server components. */ private void registerRequestMappingHandlerMappingIfNecessary(BeanDefinitionRegistry registry) { if (HttpContextUtils.SERVLET_PRESENT && !registry.containsBeanDefinition(HttpContextUtils.HANDLER_MAPPING_BEAN_NAME)) { BeanDefinitionBuilder requestMappingBuilder = BeanDefinitionBuilder .genericBeanDefinition(IntegrationRequestMappingHandlerMapping.class); requestMappingBuilder.setRole(BeanDefinition.ROLE_INFRASTRUCTURE); requestMappingBuilder.addPropertyValue(IntegrationNamespaceUtils.ORDER, 0); registry.registerBeanDefinition(HttpContextUtils.HANDLER_MAPPING_BEAN_NAME, requestMappingBuilder.getBeanDefinition()); } }
From source file:org.springframework.integration.webflux.config.WebFluxIntegrationConfigurationInitializer.java
/** * Registers a {@link WebFluxIntegrationRequestMappingHandlerMapping} * which could also be overridden by the user by simply registering * a {@link WebFluxIntegrationRequestMappingHandlerMapping} {@code <bean>} with 'id' * {@link WebFluxContextUtils#HANDLER_MAPPING_BEAN_NAME}. * <p>//w w w.ja v a 2 s . co m * In addition, checks if the {@code org.springframework.web.reactive.result.method.RequestMappingInfo} * class is present on the classpath. * When Spring Integration HTTP is used only as an HTTP client, there is no reason to use and register * the HTTP server components. */ private void registerReactiveRequestMappingHandlerMappingIfNecessary(BeanDefinitionRegistry registry) { if (HttpContextUtils.WEB_FLUX_PRESENT && !registry.containsBeanDefinition(WebFluxContextUtils.HANDLER_MAPPING_BEAN_NAME)) { BeanDefinitionBuilder requestMappingBuilder = BeanDefinitionBuilder .genericBeanDefinition(WebFluxIntegrationRequestMappingHandlerMapping.class); requestMappingBuilder.setRole(BeanDefinition.ROLE_INFRASTRUCTURE); requestMappingBuilder.addPropertyValue(IntegrationNamespaceUtils.ORDER, 0); registry.registerBeanDefinition(WebFluxContextUtils.HANDLER_MAPPING_BEAN_NAME, requestMappingBuilder.getBeanDefinition()); BeanDefinitionReaderUtils.registerWithGeneratedName( new RootBeanDefinition(IntegrationHandlerResultHandler.class), registry); } }