From 9e565ab3c947baeee2393193c76ea8a7efb6380f Mon Sep 17 00:00:00 2001 From: Mark Fisher Date: Sat, 13 Nov 2010 12:37:42 -0500 Subject: [PATCH] moved ExpressionControlBusFactoryBean into config instead of config.xml --- .../config/xml/ControlBusParser.java | 1 + .../xml/ExpressionControlBusFactoryBean.java | 59 ------------------- 2 files changed, 1 insertion(+), 59 deletions(-) delete mode 100644 spring-integration-core/src/main/java/org/springframework/integration/config/xml/ExpressionControlBusFactoryBean.java diff --git a/spring-integration-core/src/main/java/org/springframework/integration/config/xml/ControlBusParser.java b/spring-integration-core/src/main/java/org/springframework/integration/config/xml/ControlBusParser.java index 22f7894ad7..2d7f257692 100644 --- a/spring-integration-core/src/main/java/org/springframework/integration/config/xml/ControlBusParser.java +++ b/spring-integration-core/src/main/java/org/springframework/integration/config/xml/ControlBusParser.java @@ -18,6 +18,7 @@ import org.springframework.beans.factory.config.RuntimeBeanReference; import org.springframework.beans.factory.support.BeanDefinitionBuilder; import org.springframework.beans.factory.support.RootBeanDefinition; import org.springframework.beans.factory.xml.ParserContext; +import org.springframework.integration.config.ExpressionControlBusFactoryBean; import org.springframework.integration.control.ControlBusMessageProcessor; import org.springframework.util.StringUtils; import org.w3c.dom.Element; diff --git a/spring-integration-core/src/main/java/org/springframework/integration/config/xml/ExpressionControlBusFactoryBean.java b/spring-integration-core/src/main/java/org/springframework/integration/config/xml/ExpressionControlBusFactoryBean.java deleted file mode 100644 index d1e645632c..0000000000 --- a/spring-integration-core/src/main/java/org/springframework/integration/config/xml/ExpressionControlBusFactoryBean.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright 2002-2010 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package org.springframework.integration.config.xml; - -import org.springframework.expression.BeanResolver; -import org.springframework.integration.config.AbstractSimpleMessageHandlerFactoryBean; -import org.springframework.integration.control.ControlBusMessageProcessor; -import org.springframework.integration.core.MessageHandler; -import org.springframework.integration.handler.ServiceActivatingHandler; - -/** - * FactoryBean for creating {@link MessageHandler} instances to handle a message as a SpEL expression. - * - * @author Dave Syer - * - * @since 2.0 - */ -public class ExpressionControlBusFactoryBean extends AbstractSimpleMessageHandlerFactoryBean { - - private volatile Long sendTimeout; - private volatile BeanResolver beanResolver; - - private final ControlBusMessageProcessor processor; - - public ExpressionControlBusFactoryBean(ControlBusMessageProcessor processor) { - this.processor = processor; - } - - public void setBeanResolver(BeanResolver beanResolver) { - this.beanResolver = beanResolver; - } - - public void setSendTimeout(Long sendTimeout) { - this.sendTimeout = sendTimeout; - } - - protected MessageHandler createHandler() { - if (beanResolver!=null) { - processor.setBeanResolver(beanResolver); - } - ServiceActivatingHandler handler = new ServiceActivatingHandler(processor); - if (this.sendTimeout != null) { - handler.setSendTimeout(this.sendTimeout); - } - return handler; - } - -}