diff --git a/org.springframework.integration.stream/src/test/java/org/springframework/integration/stream/config/ConsoleSourceParserTests.java b/org.springframework.integration.stream/src/test/java/org/springframework/integration/stream/config/ConsoleSourceParserTests.java index 794654b105..20093b0000 100644 --- a/org.springframework.integration.stream/src/test/java/org/springframework/integration/stream/config/ConsoleSourceParserTests.java +++ b/org.springframework.integration.stream/src/test/java/org/springframework/integration/stream/config/ConsoleSourceParserTests.java @@ -33,7 +33,7 @@ import org.springframework.beans.DirectFieldAccessor; import org.springframework.beans.factory.BeanCreationException; import org.springframework.context.support.ClassPathXmlApplicationContext; import org.springframework.integration.ConfigurationException; -import org.springframework.integration.endpoint.InboundChannelAdapter; +import org.springframework.integration.endpoint.SourcePollingChannelAdapter; import org.springframework.integration.message.Message; import org.springframework.integration.message.PollableSource; @@ -52,8 +52,8 @@ public class ConsoleSourceParserTests { public void testConsoleSourceWithDefaultCharset() { ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext( "consoleSourceParserTests.xml", ConsoleSourceParserTests.class); - InboundChannelAdapter adapter = - (InboundChannelAdapter) context.getBean("sourceWithDefaultCharset.adapter"); + SourcePollingChannelAdapter adapter = + (SourcePollingChannelAdapter) context.getBean("sourceWithDefaultCharset.adapter"); PollableSource source = (PollableSource) new DirectFieldAccessor(adapter).getPropertyValue("source"); DirectFieldAccessor sourceAccessor = new DirectFieldAccessor(source); Reader bufferedReader = (Reader) sourceAccessor.getPropertyValue("reader"); @@ -72,8 +72,8 @@ public class ConsoleSourceParserTests { public void testConsoleSourceWithProvidedCharset() { ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext( "consoleSourceParserTests.xml", ConsoleSourceParserTests.class); - InboundChannelAdapter adapter = - (InboundChannelAdapter) context.getBean("sourceWithProvidedCharset.adapter"); + SourcePollingChannelAdapter adapter = + (SourcePollingChannelAdapter) context.getBean("sourceWithProvidedCharset.adapter"); PollableSource source = (PollableSource) new DirectFieldAccessor(adapter).getPropertyValue("source"); DirectFieldAccessor sourceAccessor = new DirectFieldAccessor(source); Reader bufferedReader = (Reader) sourceAccessor.getPropertyValue("reader"); diff --git a/org.springframework.integration/src/main/java/org/springframework/integration/config/AbstractPollingInboundChannelAdapterParser.java b/org.springframework.integration/src/main/java/org/springframework/integration/config/AbstractPollingInboundChannelAdapterParser.java index 90fe576978..86ab68929f 100644 --- a/org.springframework.integration/src/main/java/org/springframework/integration/config/AbstractPollingInboundChannelAdapterParser.java +++ b/org.springframework.integration/src/main/java/org/springframework/integration/config/AbstractPollingInboundChannelAdapterParser.java @@ -27,7 +27,7 @@ import org.springframework.beans.factory.xml.AbstractBeanDefinitionParser; import org.springframework.beans.factory.xml.ParserContext; import org.springframework.integration.ConfigurationException; import org.springframework.integration.channel.DirectChannel; -import org.springframework.integration.endpoint.InboundChannelAdapter; +import org.springframework.integration.endpoint.SourcePollingChannelAdapter; import org.springframework.integration.scheduling.PollingSchedule; import org.springframework.util.StringUtils; import org.springframework.util.xml.DomUtils; @@ -60,7 +60,7 @@ public abstract class AbstractPollingInboundChannelAdapterParser extends Abstrac } String channelName = element.getAttribute("channel"); Element pollerElement = DomUtils.getChildElementByTagName(element, "poller"); - BeanDefinitionBuilder adapterBuilder = BeanDefinitionBuilder.genericBeanDefinition(InboundChannelAdapter.class); + BeanDefinitionBuilder adapterBuilder = BeanDefinitionBuilder.genericBeanDefinition(SourcePollingChannelAdapter.class); adapterBuilder.addPropertyReference("source", source); if (StringUtils.hasText(channelName)) { adapterBuilder.addPropertyReference("channel", channelName); diff --git a/org.springframework.integration/src/main/java/org/springframework/integration/config/ChannelAdapterParser.java b/org.springframework.integration/src/main/java/org/springframework/integration/config/ChannelAdapterParser.java index a8b02edb1b..4f387212e5 100644 --- a/org.springframework.integration/src/main/java/org/springframework/integration/config/ChannelAdapterParser.java +++ b/org.springframework.integration/src/main/java/org/springframework/integration/config/ChannelAdapterParser.java @@ -27,7 +27,7 @@ import org.springframework.beans.factory.xml.AbstractBeanDefinitionParser; import org.springframework.beans.factory.xml.ParserContext; import org.springframework.integration.ConfigurationException; import org.springframework.integration.channel.DirectChannel; -import org.springframework.integration.endpoint.InboundChannelAdapter; +import org.springframework.integration.endpoint.SourcePollingChannelAdapter; import org.springframework.integration.endpoint.OutboundChannelAdapter; import org.springframework.integration.handler.MethodInvokingTarget; import org.springframework.integration.message.MethodInvokingSource; @@ -72,7 +72,7 @@ public class ChannelAdapterParser extends AbstractBeanDefinitionParser { invokerBuilder.addPropertyValue("methodName", methodName); source = BeanDefinitionReaderUtils.registerWithGeneratedName(invokerBuilder.getBeanDefinition(), parserContext.getRegistry()); } - adapterBuilder = BeanDefinitionBuilder.genericBeanDefinition(InboundChannelAdapter.class); + adapterBuilder = BeanDefinitionBuilder.genericBeanDefinition(SourcePollingChannelAdapter.class); adapterBuilder.addPropertyReference("source", source); if (StringUtils.hasText(channelName)) { adapterBuilder.addPropertyReference("outputChannel", channelName); diff --git a/org.springframework.integration/src/main/java/org/springframework/integration/config/annotation/ChannelAdapterAnnotationPostProcessor.java b/org.springframework.integration/src/main/java/org/springframework/integration/config/annotation/ChannelAdapterAnnotationPostProcessor.java index 780d540f17..f0d9caf61f 100644 --- a/org.springframework.integration/src/main/java/org/springframework/integration/config/annotation/ChannelAdapterAnnotationPostProcessor.java +++ b/org.springframework.integration/src/main/java/org/springframework/integration/config/annotation/ChannelAdapterAnnotationPostProcessor.java @@ -26,7 +26,7 @@ import org.springframework.integration.bus.MessageBus; import org.springframework.integration.channel.DirectChannel; import org.springframework.integration.channel.MessageChannel; import org.springframework.integration.channel.PollableChannel; -import org.springframework.integration.endpoint.InboundChannelAdapter; +import org.springframework.integration.endpoint.SourcePollingChannelAdapter; import org.springframework.integration.endpoint.MessageEndpoint; import org.springframework.integration.endpoint.OutboundChannelAdapter; import org.springframework.integration.handler.MethodInvokingTarget; @@ -82,13 +82,13 @@ public class ChannelAdapterAnnotationPostProcessor implements MethodAnnotationPo return bean; } - private InboundChannelAdapter createInboundChannelAdapter(MethodInvokingSource source, MessageChannel channel, Poller pollerAnnotation) { + private SourcePollingChannelAdapter createInboundChannelAdapter(MethodInvokingSource source, MessageChannel channel, Poller pollerAnnotation) { if (pollerAnnotation == null) { throw new ConfigurationException("The @Poller annotation is required (at method-level) " + "when using the @ChannelAdapter annotation with a no-arg method."); } Schedule schedule = this.createSchedule(pollerAnnotation); - InboundChannelAdapter adapter = new InboundChannelAdapter(); + SourcePollingChannelAdapter adapter = new SourcePollingChannelAdapter(); adapter.setSource(source); adapter.setOutputChannel(channel); adapter.setSchedule(schedule); diff --git a/org.springframework.integration/src/main/java/org/springframework/integration/endpoint/InboundChannelAdapter.java b/org.springframework.integration/src/main/java/org/springframework/integration/endpoint/SourcePollingChannelAdapter.java similarity index 96% rename from org.springframework.integration/src/main/java/org/springframework/integration/endpoint/InboundChannelAdapter.java rename to org.springframework.integration/src/main/java/org/springframework/integration/endpoint/SourcePollingChannelAdapter.java index fa55259a5e..112635365f 100644 --- a/org.springframework.integration/src/main/java/org/springframework/integration/endpoint/InboundChannelAdapter.java +++ b/org.springframework.integration/src/main/java/org/springframework/integration/endpoint/SourcePollingChannelAdapter.java @@ -30,7 +30,7 @@ import org.springframework.integration.scheduling.TaskScheduler; * * @author Mark Fisher */ -public class InboundChannelAdapter extends AbstractMessageProducingEndpoint implements Lifecycle { +public class SourcePollingChannelAdapter extends AbstractMessageProducingEndpoint implements Lifecycle { private volatile PollableSource source; diff --git a/org.springframework.integration/src/test/java/org/springframework/integration/bus/DefaultMessageBusTests.java b/org.springframework.integration/src/test/java/org/springframework/integration/bus/DefaultMessageBusTests.java index eb6cc98c0b..c6dff9db94 100644 --- a/org.springframework.integration/src/test/java/org/springframework/integration/bus/DefaultMessageBusTests.java +++ b/org.springframework.integration/src/test/java/org/springframework/integration/bus/DefaultMessageBusTests.java @@ -33,7 +33,7 @@ import org.springframework.integration.channel.PollableChannel; import org.springframework.integration.channel.PublishSubscribeChannel; import org.springframework.integration.channel.QueueChannel; import org.springframework.integration.endpoint.AbstractInOutEndpoint; -import org.springframework.integration.endpoint.InboundChannelAdapter; +import org.springframework.integration.endpoint.SourcePollingChannelAdapter; import org.springframework.integration.message.ErrorMessage; import org.springframework.integration.message.GenericMessage; import org.springframework.integration.message.Message; @@ -194,7 +194,7 @@ public class DefaultMessageBusTests { errorChannel.setBeanName("errorChannel"); bus.registerChannel(errorChannel); CountDownLatch latch = new CountDownLatch(1); - InboundChannelAdapter channelAdapter = new InboundChannelAdapter(); + SourcePollingChannelAdapter channelAdapter = new SourcePollingChannelAdapter(); channelAdapter.setSource(new FailingSource(latch)); channelAdapter.setSchedule(new PollingSchedule(1000)); channelAdapter.setOutputChannel(outputChannel); diff --git a/org.springframework.integration/src/test/java/org/springframework/integration/config/ChannelAdapterParserTests.java b/org.springframework.integration/src/test/java/org/springframework/integration/config/ChannelAdapterParserTests.java index e0307571a3..f9c9715427 100644 --- a/org.springframework.integration/src/test/java/org/springframework/integration/config/ChannelAdapterParserTests.java +++ b/org.springframework.integration/src/test/java/org/springframework/integration/config/ChannelAdapterParserTests.java @@ -27,7 +27,7 @@ import org.springframework.integration.bus.MessageBus; import org.springframework.integration.channel.DirectChannel; import org.springframework.integration.channel.MessageChannel; import org.springframework.integration.channel.PollableChannel; -import org.springframework.integration.endpoint.InboundChannelAdapter; +import org.springframework.integration.endpoint.SourcePollingChannelAdapter; import org.springframework.integration.endpoint.OutboundChannelAdapter; import org.springframework.integration.message.Message; import org.springframework.integration.message.StringMessage; @@ -88,7 +88,7 @@ public class ChannelAdapterParserTests extends AbstractJUnit4SpringContextTests assertNull(bus.lookupChannel(beanName)); Object adapter = bus.lookupEndpoint(beanName); assertNotNull(adapter); - assertTrue(adapter instanceof InboundChannelAdapter); + assertTrue(adapter instanceof SourcePollingChannelAdapter); TestBean testBean = (TestBean) this.applicationContext.getBean("testBean"); testBean.store("source test"); bus.start();