Renamed AbstractInOutEndpoint to AbstractMessageHandlingEndpoint to be consistent with AbstractMessageProducingEndpoint and AbstractMessageConsumingEndpoint.
This commit is contained in:
@@ -31,7 +31,7 @@ import org.apache.commons.logging.LogFactory;
|
||||
|
||||
import org.springframework.integration.channel.BlockingChannel;
|
||||
import org.springframework.integration.channel.MessageChannel;
|
||||
import org.springframework.integration.endpoint.AbstractInOutEndpoint;
|
||||
import org.springframework.integration.endpoint.AbstractMessageHandlingEndpoint;
|
||||
import org.springframework.integration.endpoint.MessageEndpoint;
|
||||
import org.springframework.integration.message.Message;
|
||||
import org.springframework.integration.message.MessageHandlingException;
|
||||
@@ -60,7 +60,7 @@ import org.springframework.util.ObjectUtils;
|
||||
* @author Mark Fisher
|
||||
* @author Marius Bogoevici
|
||||
*/
|
||||
public abstract class AbstractMessageBarrierEndpoint extends AbstractInOutEndpoint {
|
||||
public abstract class AbstractMessageBarrierEndpoint extends AbstractMessageHandlingEndpoint {
|
||||
|
||||
public final static long DEFAULT_SEND_TIMEOUT = 1000;
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ import org.springframework.integration.channel.ChannelRegistry;
|
||||
import org.springframework.integration.channel.MessageChannel;
|
||||
import org.springframework.integration.channel.PollableChannel;
|
||||
import org.springframework.integration.endpoint.AbstractEndpoint;
|
||||
import org.springframework.integration.endpoint.AbstractInOutEndpoint;
|
||||
import org.springframework.integration.endpoint.AbstractMessageHandlingEndpoint;
|
||||
import org.springframework.integration.endpoint.AbstractMessageConsumingEndpoint;
|
||||
import org.springframework.integration.scheduling.PollingSchedule;
|
||||
import org.springframework.util.Assert;
|
||||
@@ -100,14 +100,14 @@ public abstract class AbstractMethodAnnotationPostProcessor<T extends Annotation
|
||||
}
|
||||
consumingEndpoint.setInputChannel(inputChannel);
|
||||
}
|
||||
if (endpoint instanceof AbstractInOutEndpoint) {
|
||||
if (endpoint instanceof AbstractMessageHandlingEndpoint) {
|
||||
String outputChannelName = (String) AnnotationUtils.getValue(annotation, OUTPUT_CHANNEL_ATTRIBUTE);
|
||||
if (StringUtils.hasText(outputChannelName)) {
|
||||
MessageChannel outputChannel = this.messageBus.lookupChannel(outputChannelName);
|
||||
if (outputChannel == null) {
|
||||
throw new ConfigurationException("unable to resolve outputChannel '" + outputChannelName + "'");
|
||||
}
|
||||
((AbstractInOutEndpoint) endpoint).setOutputChannel(outputChannel);
|
||||
((AbstractMessageHandlingEndpoint) endpoint).setOutputChannel(outputChannel);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@ import org.springframework.integration.message.selector.MessageSelector;
|
||||
/**
|
||||
* @author Mark Fisher
|
||||
*/
|
||||
public abstract class AbstractInOutEndpoint extends AbstractMessageConsumingEndpoint {
|
||||
public abstract class AbstractMessageHandlingEndpoint extends AbstractMessageConsumingEndpoint {
|
||||
|
||||
private MessageChannel outputChannel;
|
||||
|
||||
@@ -23,7 +23,7 @@ import org.springframework.util.Assert;
|
||||
/**
|
||||
* @author Mark Fisher
|
||||
*/
|
||||
public class MessagingBridge extends AbstractInOutEndpoint {
|
||||
public class MessagingBridge extends AbstractMessageHandlingEndpoint {
|
||||
|
||||
private final MessageTarget target;
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ import org.springframework.util.Assert;
|
||||
/**
|
||||
* @author Mark Fisher
|
||||
*/
|
||||
public class ServiceActivatorEndpoint extends AbstractInOutEndpoint {
|
||||
public class ServiceActivatorEndpoint extends AbstractMessageHandlingEndpoint {
|
||||
|
||||
public static final String DEFAULT_LISTENER_METHOD = "handle";
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
package org.springframework.integration.handler;
|
||||
|
||||
import org.springframework.integration.endpoint.AbstractInOutEndpoint;
|
||||
import org.springframework.integration.endpoint.AbstractMessageHandlingEndpoint;
|
||||
import org.springframework.integration.message.Message;
|
||||
import org.springframework.integration.message.selector.MessageSelector;
|
||||
import org.springframework.util.Assert;
|
||||
@@ -27,7 +27,7 @@ import org.springframework.util.Assert;
|
||||
*
|
||||
* @author Mark Fisher
|
||||
*/
|
||||
public class MessageFilter extends AbstractInOutEndpoint {
|
||||
public class MessageFilter extends AbstractMessageHandlingEndpoint {
|
||||
|
||||
private MessageSelector selector;
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
package org.springframework.integration.handler;
|
||||
|
||||
import org.springframework.integration.channel.MessageChannel;
|
||||
import org.springframework.integration.endpoint.AbstractInOutEndpoint;
|
||||
import org.springframework.integration.endpoint.AbstractMessageHandlingEndpoint;
|
||||
import org.springframework.integration.message.Message;
|
||||
import org.springframework.integration.message.MessageHandlingException;
|
||||
import org.springframework.integration.message.MessagingException;
|
||||
@@ -27,7 +27,7 @@ import org.springframework.integration.message.MessagingException;
|
||||
*
|
||||
* @author Mark Fisher
|
||||
*/
|
||||
public class ReplyMessageCorrelator extends AbstractInOutEndpoint {
|
||||
public class ReplyMessageCorrelator extends AbstractMessageHandlingEndpoint {
|
||||
|
||||
@Override
|
||||
public Message<?> handle(Message<?> message) {
|
||||
|
||||
@@ -18,7 +18,7 @@ package org.springframework.integration.splitter;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.integration.endpoint.AbstractInOutEndpoint;
|
||||
import org.springframework.integration.endpoint.AbstractMessageHandlingEndpoint;
|
||||
import org.springframework.integration.message.CompositeMessage;
|
||||
import org.springframework.integration.message.Message;
|
||||
import org.springframework.util.Assert;
|
||||
@@ -26,7 +26,7 @@ import org.springframework.util.Assert;
|
||||
/**
|
||||
* @author Mark Fisher
|
||||
*/
|
||||
public class SplitterEndpoint extends AbstractInOutEndpoint {
|
||||
public class SplitterEndpoint extends AbstractMessageHandlingEndpoint {
|
||||
|
||||
private final Splitter splitter;
|
||||
|
||||
|
||||
@@ -16,14 +16,14 @@
|
||||
|
||||
package org.springframework.integration.transformer;
|
||||
|
||||
import org.springframework.integration.endpoint.AbstractInOutEndpoint;
|
||||
import org.springframework.integration.endpoint.AbstractMessageHandlingEndpoint;
|
||||
import org.springframework.integration.message.Message;
|
||||
import org.springframework.util.Assert;
|
||||
|
||||
/**
|
||||
* @author Mark Fisher
|
||||
*/
|
||||
public class TransformerEndpoint extends AbstractInOutEndpoint {
|
||||
public class TransformerEndpoint extends AbstractMessageHandlingEndpoint {
|
||||
|
||||
private final Transformer transformer;
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ import org.springframework.integration.channel.ChannelRegistry;
|
||||
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.AbstractMessageHandlingEndpoint;
|
||||
import org.springframework.integration.endpoint.SourcePollingChannelAdapter;
|
||||
import org.springframework.integration.message.ErrorMessage;
|
||||
import org.springframework.integration.message.GenericMessage;
|
||||
@@ -60,7 +60,7 @@ public class DefaultMessageBusTests {
|
||||
Message<String> message = MessageBuilder.withPayload("test")
|
||||
.setReturnAddress("targetChannel").build();
|
||||
sourceChannel.send(message);
|
||||
AbstractInOutEndpoint endpoint = new AbstractInOutEndpoint() {
|
||||
AbstractMessageHandlingEndpoint endpoint = new AbstractMessageHandlingEndpoint() {
|
||||
public Message<?> handle(Message<?> message) {
|
||||
return message;
|
||||
}
|
||||
@@ -114,12 +114,12 @@ public class DefaultMessageBusTests {
|
||||
QueueChannel inputChannel = new QueueChannel();
|
||||
QueueChannel outputChannel1 = new QueueChannel();
|
||||
QueueChannel outputChannel2 = new QueueChannel();
|
||||
AbstractInOutEndpoint endpoint1 = new AbstractInOutEndpoint() {
|
||||
AbstractMessageHandlingEndpoint endpoint1 = new AbstractMessageHandlingEndpoint() {
|
||||
public Message<?> handle(Message<?> message) {
|
||||
return MessageBuilder.fromMessage(message).build();
|
||||
}
|
||||
};
|
||||
AbstractInOutEndpoint endpoint2 = new AbstractInOutEndpoint() {
|
||||
AbstractMessageHandlingEndpoint endpoint2 = new AbstractMessageHandlingEndpoint() {
|
||||
public Message<?> handle(Message<?> message) {
|
||||
return MessageBuilder.fromMessage(message).build();
|
||||
}
|
||||
@@ -155,14 +155,14 @@ public class DefaultMessageBusTests {
|
||||
QueueChannel outputChannel1 = new QueueChannel();
|
||||
QueueChannel outputChannel2 = new QueueChannel();
|
||||
final CountDownLatch latch = new CountDownLatch(2);
|
||||
AbstractInOutEndpoint endpoint1 = new AbstractInOutEndpoint() {
|
||||
AbstractMessageHandlingEndpoint endpoint1 = new AbstractMessageHandlingEndpoint() {
|
||||
public Message<?> handle(Message<?> message) {
|
||||
Message<?> reply = MessageBuilder.fromMessage(message).build();
|
||||
latch.countDown();
|
||||
return reply;
|
||||
}
|
||||
};
|
||||
AbstractInOutEndpoint endpoint2 = new AbstractInOutEndpoint() {
|
||||
AbstractMessageHandlingEndpoint endpoint2 = new AbstractMessageHandlingEndpoint() {
|
||||
public Message<?> handle(Message<?> message) {
|
||||
Message<?> reply = MessageBuilder.fromMessage(message).build();
|
||||
latch.countDown();
|
||||
@@ -244,7 +244,7 @@ public class DefaultMessageBusTests {
|
||||
errorChannel.setBeanName(ChannelRegistry.ERROR_CHANNEL_NAME);
|
||||
context.getBeanFactory().registerSingleton(ChannelRegistry.ERROR_CHANNEL_NAME, errorChannel);
|
||||
final CountDownLatch latch = new CountDownLatch(1);
|
||||
AbstractInOutEndpoint endpoint = new AbstractInOutEndpoint() {
|
||||
AbstractMessageHandlingEndpoint endpoint = new AbstractMessageHandlingEndpoint() {
|
||||
public Message<?> handle(Message<?> message) {
|
||||
latch.countDown();
|
||||
return null;
|
||||
|
||||
@@ -29,7 +29,7 @@ import org.springframework.integration.channel.DirectChannel;
|
||||
import org.springframework.integration.channel.QueueChannel;
|
||||
import org.springframework.integration.channel.ThreadLocalChannel;
|
||||
import org.springframework.integration.config.annotation.MessagingAnnotationPostProcessor;
|
||||
import org.springframework.integration.endpoint.AbstractInOutEndpoint;
|
||||
import org.springframework.integration.endpoint.AbstractMessageHandlingEndpoint;
|
||||
import org.springframework.integration.endpoint.ServiceActivatorEndpoint;
|
||||
import org.springframework.integration.message.Message;
|
||||
import org.springframework.integration.message.MessageMappingMethodInvoker;
|
||||
@@ -96,7 +96,7 @@ public class DirectChannelSubscriptionTests {
|
||||
QueueChannel errorChannel = new QueueChannel();
|
||||
errorChannel.setBeanName(ChannelRegistry.ERROR_CHANNEL_NAME);
|
||||
bus.registerChannel(errorChannel);
|
||||
AbstractInOutEndpoint endpoint = new AbstractInOutEndpoint() {
|
||||
AbstractMessageHandlingEndpoint endpoint = new AbstractMessageHandlingEndpoint() {
|
||||
public Message<?> handle(Message<?> message) {
|
||||
throw new RuntimeException("intentional test failure");
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ import java.util.concurrent.atomic.AtomicInteger;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
import org.springframework.integration.endpoint.AbstractInOutEndpoint;
|
||||
import org.springframework.integration.endpoint.AbstractMessageHandlingEndpoint;
|
||||
import org.springframework.integration.endpoint.ServiceActivatorEndpoint;
|
||||
import org.springframework.integration.handler.TestHandlers;
|
||||
import org.springframework.integration.message.Message;
|
||||
@@ -161,9 +161,9 @@ public class SimpleDispatcherTests {
|
||||
final AtomicInteger counter2 = new AtomicInteger();
|
||||
final AtomicInteger counter3 = new AtomicInteger();
|
||||
final AtomicInteger selectorCounter = new AtomicInteger();
|
||||
AbstractInOutEndpoint endpoint1 = createEndpoint(TestHandlers.countingCountDownHandler(counter1, latch));
|
||||
AbstractInOutEndpoint endpoint2 = createEndpoint(TestHandlers.countingCountDownHandler(counter2, latch));
|
||||
AbstractInOutEndpoint endpoint3 = createEndpoint(TestHandlers.countingCountDownHandler(counter3, latch));
|
||||
AbstractMessageHandlingEndpoint endpoint1 = createEndpoint(TestHandlers.countingCountDownHandler(counter1, latch));
|
||||
AbstractMessageHandlingEndpoint endpoint2 = createEndpoint(TestHandlers.countingCountDownHandler(counter2, latch));
|
||||
AbstractMessageHandlingEndpoint endpoint3 = createEndpoint(TestHandlers.countingCountDownHandler(counter3, latch));
|
||||
endpoint1.setSelector(new TestMessageSelector(selectorCounter, false));
|
||||
endpoint2.setSelector(new TestMessageSelector(selectorCounter, false));
|
||||
endpoint3.setSelector(new TestMessageSelector(selectorCounter, true));
|
||||
@@ -186,9 +186,9 @@ public class SimpleDispatcherTests {
|
||||
final AtomicInteger counter2 = new AtomicInteger();
|
||||
final AtomicInteger counter3 = new AtomicInteger();
|
||||
final AtomicInteger selectorCounter = new AtomicInteger();
|
||||
AbstractInOutEndpoint endpoint1 = createEndpoint(TestHandlers.countingCountDownHandler(counter1, latch));
|
||||
AbstractInOutEndpoint endpoint2 = createEndpoint(TestHandlers.countingCountDownHandler(counter2, latch));
|
||||
AbstractInOutEndpoint endpoint3 = createEndpoint(TestHandlers.countingCountDownHandler(counter3, latch));
|
||||
AbstractMessageHandlingEndpoint endpoint1 = createEndpoint(TestHandlers.countingCountDownHandler(counter1, latch));
|
||||
AbstractMessageHandlingEndpoint endpoint2 = createEndpoint(TestHandlers.countingCountDownHandler(counter2, latch));
|
||||
AbstractMessageHandlingEndpoint endpoint3 = createEndpoint(TestHandlers.countingCountDownHandler(counter3, latch));
|
||||
endpoint1.setSelector(new TestMessageSelector(selectorCounter, false));
|
||||
endpoint2.setSelector(new TestMessageSelector(selectorCounter, false));
|
||||
endpoint3.setSelector(new TestMessageSelector(selectorCounter, false));
|
||||
|
||||
@@ -31,7 +31,7 @@ import org.springframework.context.support.GenericApplicationContext;
|
||||
import org.springframework.integration.bus.DefaultMessageBus;
|
||||
import org.springframework.integration.channel.MessageChannel;
|
||||
import org.springframework.integration.channel.QueueChannel;
|
||||
import org.springframework.integration.endpoint.AbstractInOutEndpoint;
|
||||
import org.springframework.integration.endpoint.AbstractMessageHandlingEndpoint;
|
||||
|
||||
/**
|
||||
* @author Mark Fisher
|
||||
@@ -45,7 +45,7 @@ public class MessageChannelTemplateTests {
|
||||
public void setUp() {
|
||||
this.requestChannel = new QueueChannel();
|
||||
this.requestChannel.setBeanName("requestChannel");
|
||||
AbstractInOutEndpoint endpoint = new AbstractInOutEndpoint() {
|
||||
AbstractMessageHandlingEndpoint endpoint = new AbstractMessageHandlingEndpoint() {
|
||||
public Message<?> handle(Message<?> message) {
|
||||
return new StringMessage(message.getPayload().toString().toUpperCase());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user