Renamed SubscribingConsumerEndpoint to EventDrivenConsumer.
This commit is contained in:
@@ -42,7 +42,7 @@ import org.springframework.integration.consumer.ReplyMessageHolder;
|
||||
import org.springframework.integration.core.Message;
|
||||
import org.springframework.integration.endpoint.PollingConsumer;
|
||||
import org.springframework.integration.endpoint.SourcePollingChannelAdapter;
|
||||
import org.springframework.integration.endpoint.SubscribingConsumerEndpoint;
|
||||
import org.springframework.integration.endpoint.EventDrivenConsumer;
|
||||
import org.springframework.integration.message.ErrorMessage;
|
||||
import org.springframework.integration.message.GenericMessage;
|
||||
import org.springframework.integration.message.MessageBuilder;
|
||||
@@ -195,8 +195,8 @@ public class ApplicationContextMessageBusTests {
|
||||
context.getBeanFactory().registerSingleton("output2", outputChannel2);
|
||||
handler1.setOutputChannel(outputChannel1);
|
||||
handler2.setOutputChannel(outputChannel2);
|
||||
SubscribingConsumerEndpoint endpoint1 = new SubscribingConsumerEndpoint(inputChannel, handler1);
|
||||
SubscribingConsumerEndpoint endpoint2 = new SubscribingConsumerEndpoint(inputChannel, handler2);
|
||||
EventDrivenConsumer endpoint1 = new EventDrivenConsumer(inputChannel, handler1);
|
||||
EventDrivenConsumer endpoint2 = new EventDrivenConsumer(inputChannel, handler2);
|
||||
context.getBeanFactory().registerSingleton("testEndpoint1", endpoint1);
|
||||
context.getBeanFactory().registerSingleton("testEndpoint2", endpoint2);
|
||||
ApplicationContextMessageBus bus = new ApplicationContextMessageBus();
|
||||
|
||||
@@ -34,7 +34,7 @@ import org.springframework.integration.consumer.ReplyMessageHolder;
|
||||
import org.springframework.integration.consumer.ServiceActivatingHandler;
|
||||
import org.springframework.integration.core.Message;
|
||||
import org.springframework.integration.core.MessagingException;
|
||||
import org.springframework.integration.endpoint.SubscribingConsumerEndpoint;
|
||||
import org.springframework.integration.endpoint.EventDrivenConsumer;
|
||||
import org.springframework.integration.message.StringMessage;
|
||||
import org.springframework.integration.util.TestUtils;
|
||||
|
||||
@@ -69,7 +69,7 @@ public class DirectChannelSubscriptionTests {
|
||||
GenericApplicationContext context = new GenericApplicationContext();
|
||||
ServiceActivatingHandler serviceActivator = new ServiceActivatingHandler(new TestBean(), "handle");
|
||||
serviceActivator.setOutputChannel(targetChannel);
|
||||
SubscribingConsumerEndpoint endpoint = new SubscribingConsumerEndpoint(sourceChannel, serviceActivator);
|
||||
EventDrivenConsumer endpoint = new EventDrivenConsumer(sourceChannel, serviceActivator);
|
||||
context.getBeanFactory().registerSingleton("testEndpoint", endpoint);
|
||||
bus.setApplicationContext(context);
|
||||
context.refresh();
|
||||
@@ -104,7 +104,7 @@ public class DirectChannelSubscriptionTests {
|
||||
}
|
||||
};
|
||||
handler.setOutputChannel(targetChannel);
|
||||
SubscribingConsumerEndpoint endpoint = new SubscribingConsumerEndpoint(sourceChannel, handler);
|
||||
EventDrivenConsumer endpoint = new EventDrivenConsumer(sourceChannel, handler);
|
||||
context.getBeanFactory().registerSingleton("testEndpoint", endpoint);
|
||||
bus.setApplicationContext(context);
|
||||
context.refresh();
|
||||
|
||||
@@ -34,7 +34,7 @@ import org.springframework.integration.aggregator.MethodInvokingAggregator;
|
||||
import org.springframework.integration.channel.PollableChannel;
|
||||
import org.springframework.integration.core.Message;
|
||||
import org.springframework.integration.core.MessageChannel;
|
||||
import org.springframework.integration.endpoint.SubscribingConsumerEndpoint;
|
||||
import org.springframework.integration.endpoint.EventDrivenConsumer;
|
||||
import org.springframework.integration.message.MessageBuilder;
|
||||
import org.springframework.integration.util.MethodInvoker;
|
||||
import org.springframework.integration.util.TestUtils;
|
||||
@@ -73,8 +73,8 @@ public class AggregatorParserTests {
|
||||
|
||||
@Test
|
||||
public void testPropertyAssignment() throws Exception {
|
||||
SubscribingConsumerEndpoint endpoint =
|
||||
(SubscribingConsumerEndpoint) context.getBean("completelyDefinedAggregator");
|
||||
EventDrivenConsumer endpoint =
|
||||
(EventDrivenConsumer) context.getBean("completelyDefinedAggregator");
|
||||
CompletionStrategy completionStrategy = (CompletionStrategy) context.getBean("completionStrategy");
|
||||
MessageChannel outputChannel = (MessageChannel) context.getBean("outputChannel");
|
||||
MessageChannel discardChannel = (MessageChannel) context.getBean("discardChannel");
|
||||
@@ -135,8 +135,8 @@ public class AggregatorParserTests {
|
||||
@Test
|
||||
public void testAggregatorWithPojoCompletionStrategy() {
|
||||
MessageChannel input = (MessageChannel) context.getBean("aggregatorWithPojoCompletionStrategyInput");
|
||||
SubscribingConsumerEndpoint endpoint =
|
||||
(SubscribingConsumerEndpoint) context.getBean("aggregatorWithPojoCompletionStrategy");
|
||||
EventDrivenConsumer endpoint =
|
||||
(EventDrivenConsumer) context.getBean("aggregatorWithPojoCompletionStrategy");
|
||||
CompletionStrategy completionStrategy = (CompletionStrategy) new DirectFieldAccessor(
|
||||
new DirectFieldAccessor(endpoint).getPropertyValue("handler")).getPropertyValue("completionStrategy");
|
||||
Assert.assertTrue(completionStrategy instanceof CompletionStrategyAdapter);
|
||||
|
||||
@@ -32,7 +32,7 @@ import org.springframework.integration.config.xml.MessageBusParser;
|
||||
import org.springframework.integration.core.Message;
|
||||
import org.springframework.integration.core.MessageChannel;
|
||||
import org.springframework.integration.endpoint.SourcePollingChannelAdapter;
|
||||
import org.springframework.integration.endpoint.SubscribingConsumerEndpoint;
|
||||
import org.springframework.integration.endpoint.EventDrivenConsumer;
|
||||
import org.springframework.integration.message.StringMessage;
|
||||
import org.springframework.test.context.ContextConfiguration;
|
||||
import org.springframework.test.context.junit4.AbstractJUnit4SpringContextTests;
|
||||
@@ -54,7 +54,7 @@ public class ChannelAdapterParserTests extends AbstractJUnit4SpringContextTests
|
||||
assertNotNull(channelResolver.resolveChannelName(beanName));
|
||||
Object adapter = this.applicationContext.getBean(beanName + ".adapter");
|
||||
assertNotNull(adapter);
|
||||
assertTrue(adapter instanceof SubscribingConsumerEndpoint);
|
||||
assertTrue(adapter instanceof EventDrivenConsumer);
|
||||
TestConsumer consumer = (TestConsumer) this.applicationContext.getBean("consumer");
|
||||
assertNull(consumer.getLastMessage());
|
||||
Message<?> message = new StringMessage("test");
|
||||
@@ -75,7 +75,7 @@ public class ChannelAdapterParserTests extends AbstractJUnit4SpringContextTests
|
||||
assertNotNull(channelResolver.resolveChannelName(beanName));
|
||||
Object adapter = this.applicationContext.getBean(beanName + ".adapter");
|
||||
assertNotNull(adapter);
|
||||
assertTrue(adapter instanceof SubscribingConsumerEndpoint);
|
||||
assertTrue(adapter instanceof EventDrivenConsumer);
|
||||
TestBean testBean = (TestBean) this.applicationContext.getBean("testBean");
|
||||
assertNull(testBean.getMessage());
|
||||
Message<?> message = new StringMessage("consumer test");
|
||||
|
||||
@@ -34,7 +34,7 @@ import org.springframework.integration.aggregator.Resequencer;
|
||||
import org.springframework.integration.channel.PollableChannel;
|
||||
import org.springframework.integration.core.Message;
|
||||
import org.springframework.integration.core.MessageChannel;
|
||||
import org.springframework.integration.endpoint.SubscribingConsumerEndpoint;
|
||||
import org.springframework.integration.endpoint.EventDrivenConsumer;
|
||||
import org.springframework.integration.message.MessageBuilder;
|
||||
|
||||
/**
|
||||
@@ -75,7 +75,7 @@ public class ResequencerParserTests {
|
||||
|
||||
@Test
|
||||
public void testDefaultResequencerProperties() {
|
||||
SubscribingConsumerEndpoint endpoint = (SubscribingConsumerEndpoint) context.getBean("defaultResequencer");
|
||||
EventDrivenConsumer endpoint = (EventDrivenConsumer) context.getBean("defaultResequencer");
|
||||
Resequencer resequencer = (Resequencer) new DirectFieldAccessor(endpoint).getPropertyValue("handler");
|
||||
assertNull(getPropertyValue(resequencer, "outputChannel"));
|
||||
assertNull(getPropertyValue(resequencer, "discardChannel"));
|
||||
@@ -95,7 +95,7 @@ public class ResequencerParserTests {
|
||||
|
||||
@Test
|
||||
public void testPropertyAssignment() throws Exception {
|
||||
SubscribingConsumerEndpoint endpoint = (SubscribingConsumerEndpoint) context.getBean("completelyDefinedResequencer");
|
||||
EventDrivenConsumer endpoint = (EventDrivenConsumer) context.getBean("completelyDefinedResequencer");
|
||||
MessageChannel outputChannel = (MessageChannel) context.getBean("outputChannel");
|
||||
MessageChannel discardChannel = (MessageChannel) context.getBean("discardChannel");
|
||||
Resequencer resequencer = (Resequencer) new DirectFieldAccessor(endpoint).getPropertyValue("handler");
|
||||
|
||||
@@ -36,7 +36,7 @@ import org.springframework.integration.aggregator.CompletionStrategyAdapter;
|
||||
import org.springframework.integration.aggregator.SequenceSizeCompletionStrategy;
|
||||
import org.springframework.integration.channel.BeanFactoryChannelResolver;
|
||||
import org.springframework.integration.channel.ChannelResolver;
|
||||
import org.springframework.integration.endpoint.SubscribingConsumerEndpoint;
|
||||
import org.springframework.integration.endpoint.EventDrivenConsumer;
|
||||
|
||||
/**
|
||||
* @author Marius Bogoevici
|
||||
@@ -102,7 +102,7 @@ public class AggregatorAnnotationTests {
|
||||
|
||||
|
||||
private AbstractMessageAggregator getAggregator(ApplicationContext context, final String endpointName) {
|
||||
SubscribingConsumerEndpoint endpoint = (SubscribingConsumerEndpoint) context.getBean(
|
||||
EventDrivenConsumer endpoint = (EventDrivenConsumer) context.getBean(
|
||||
endpointName + ".aggregatingMethod.aggregator");
|
||||
return (AbstractMessageAggregator) new DirectFieldAccessor(endpoint).getPropertyValue("handler");
|
||||
}
|
||||
|
||||
@@ -44,7 +44,7 @@ public class CorrelationIdTests {
|
||||
QueueChannel outputChannel = new QueueChannel(1);
|
||||
ServiceActivatingHandler serviceActivator = new ServiceActivatingHandler(new TestBean(), "upperCase");
|
||||
serviceActivator.setOutputChannel(outputChannel);
|
||||
SubscribingConsumerEndpoint endpoint = new SubscribingConsumerEndpoint(inputChannel, serviceActivator);
|
||||
EventDrivenConsumer endpoint = new EventDrivenConsumer(inputChannel, serviceActivator);
|
||||
endpoint.start();
|
||||
assertTrue(inputChannel.send(message));
|
||||
Message<?> reply = outputChannel.receive(0);
|
||||
@@ -59,7 +59,7 @@ public class CorrelationIdTests {
|
||||
QueueChannel outputChannel = new QueueChannel(1);
|
||||
ServiceActivatingHandler serviceActivator = new ServiceActivatingHandler(new TestBean(), "upperCase");
|
||||
serviceActivator.setOutputChannel(outputChannel);
|
||||
SubscribingConsumerEndpoint endpoint = new SubscribingConsumerEndpoint(inputChannel, serviceActivator);
|
||||
EventDrivenConsumer endpoint = new EventDrivenConsumer(inputChannel, serviceActivator);
|
||||
endpoint.start();
|
||||
assertTrue(inputChannel.send(message));
|
||||
Message<?> reply = outputChannel.receive(0);
|
||||
@@ -76,7 +76,7 @@ public class CorrelationIdTests {
|
||||
QueueChannel outputChannel = new QueueChannel(1);
|
||||
ServiceActivatingHandler serviceActivator = new ServiceActivatingHandler(new TestBean(), "createMessage");
|
||||
serviceActivator.setOutputChannel(outputChannel);
|
||||
SubscribingConsumerEndpoint endpoint = new SubscribingConsumerEndpoint(inputChannel, serviceActivator);
|
||||
EventDrivenConsumer endpoint = new EventDrivenConsumer(inputChannel, serviceActivator);
|
||||
endpoint.start();
|
||||
assertTrue(inputChannel.send(message));
|
||||
Message<?> reply = outputChannel.receive(0);
|
||||
@@ -90,7 +90,7 @@ public class CorrelationIdTests {
|
||||
QueueChannel outputChannel = new QueueChannel(1);
|
||||
ServiceActivatingHandler serviceActivator = new ServiceActivatingHandler(new TestBean(), "createMessage");
|
||||
serviceActivator.setOutputChannel(outputChannel);
|
||||
SubscribingConsumerEndpoint endpoint = new SubscribingConsumerEndpoint(inputChannel, serviceActivator);
|
||||
EventDrivenConsumer endpoint = new EventDrivenConsumer(inputChannel, serviceActivator);
|
||||
endpoint.start();
|
||||
assertTrue(inputChannel.send(message));
|
||||
Message<?> reply = outputChannel.receive(0);
|
||||
|
||||
@@ -26,7 +26,7 @@ import org.junit.Test;
|
||||
import org.springframework.integration.channel.DirectChannel;
|
||||
import org.springframework.integration.channel.QueueChannel;
|
||||
import org.springframework.integration.core.Message;
|
||||
import org.springframework.integration.endpoint.SubscribingConsumerEndpoint;
|
||||
import org.springframework.integration.endpoint.EventDrivenConsumer;
|
||||
import org.springframework.integration.filter.MessageFilter;
|
||||
import org.springframework.integration.message.StringMessage;
|
||||
import org.springframework.integration.selector.MessageSelector;
|
||||
@@ -73,7 +73,7 @@ public class MessageFilterTests {
|
||||
}
|
||||
});
|
||||
filter.setOutputChannel(outputChannel);
|
||||
SubscribingConsumerEndpoint endpoint = new SubscribingConsumerEndpoint(inputChannel, filter);
|
||||
EventDrivenConsumer endpoint = new EventDrivenConsumer(inputChannel, filter);
|
||||
endpoint.start();
|
||||
Message<?> message = new StringMessage("test");
|
||||
assertTrue(inputChannel.send(message));
|
||||
@@ -92,7 +92,7 @@ public class MessageFilterTests {
|
||||
}
|
||||
});
|
||||
filter.setOutputChannel(outputChannel);
|
||||
SubscribingConsumerEndpoint endpoint = new SubscribingConsumerEndpoint(inputChannel, filter);
|
||||
EventDrivenConsumer endpoint = new EventDrivenConsumer(inputChannel, filter);
|
||||
endpoint.start();
|
||||
Message<?> message = new StringMessage("test");
|
||||
assertTrue(inputChannel.send(message));
|
||||
|
||||
@@ -28,7 +28,7 @@ import org.junit.Test;
|
||||
import org.springframework.integration.channel.DirectChannel;
|
||||
import org.springframework.integration.channel.QueueChannel;
|
||||
import org.springframework.integration.core.Message;
|
||||
import org.springframework.integration.endpoint.SubscribingConsumerEndpoint;
|
||||
import org.springframework.integration.endpoint.EventDrivenConsumer;
|
||||
import org.springframework.integration.message.MessageBuilder;
|
||||
|
||||
/**
|
||||
@@ -85,7 +85,7 @@ public class DefaultSplitterTests {
|
||||
QueueChannel outputChannel = new QueueChannel(1);
|
||||
DefaultMessageSplitter splitter = new DefaultMessageSplitter();
|
||||
splitter.setOutputChannel(outputChannel);
|
||||
SubscribingConsumerEndpoint endpoint = new SubscribingConsumerEndpoint(inputChannel, splitter);
|
||||
EventDrivenConsumer endpoint = new EventDrivenConsumer(inputChannel, splitter);
|
||||
endpoint.start();
|
||||
assertTrue(inputChannel.send(message));
|
||||
Message<?> reply = outputChannel.receive(0);
|
||||
|
||||
@@ -33,7 +33,7 @@ import org.springframework.integration.annotation.ServiceActivator;
|
||||
import org.springframework.integration.channel.DirectChannel;
|
||||
import org.springframework.integration.channel.QueueChannel;
|
||||
import org.springframework.integration.consumer.ServiceActivatingHandler;
|
||||
import org.springframework.integration.endpoint.SubscribingConsumerEndpoint;
|
||||
import org.springframework.integration.endpoint.EventDrivenConsumer;
|
||||
import org.springframework.integration.message.StringMessage;
|
||||
|
||||
/**
|
||||
@@ -84,7 +84,7 @@ public class DefaultMethodResolverTests {
|
||||
testBean = (GreetingService) proxyFactory.getProxy();
|
||||
ServiceActivatingHandler handler = new ServiceActivatingHandler(testBean);
|
||||
handler.setOutputChannel(output);
|
||||
SubscribingConsumerEndpoint endpoint = new SubscribingConsumerEndpoint(input, handler);
|
||||
EventDrivenConsumer endpoint = new EventDrivenConsumer(input, handler);
|
||||
endpoint.start();
|
||||
input.send(new StringMessage("proxy"));
|
||||
assertEquals("hello proxy", output.receive(0).getPayload());;
|
||||
@@ -100,7 +100,7 @@ public class DefaultMethodResolverTests {
|
||||
testBean = (GreetingService) proxyFactory.getProxy();
|
||||
ServiceActivatingHandler handler = new ServiceActivatingHandler(testBean);
|
||||
handler.setOutputChannel(output);
|
||||
SubscribingConsumerEndpoint endpoint = new SubscribingConsumerEndpoint(input, handler);
|
||||
EventDrivenConsumer endpoint = new EventDrivenConsumer(input, handler);
|
||||
endpoint.start();
|
||||
input.send(new StringMessage("proxy"));
|
||||
assertEquals("hello proxy", output.receive(0).getPayload());;
|
||||
|
||||
Reference in New Issue
Block a user