Renamed SubscribingConsumerEndpoint to EventDrivenConsumer.
This commit is contained in:
@@ -28,7 +28,7 @@ import org.springframework.integration.channel.SubscribableChannel;
|
||||
import org.springframework.integration.core.MessageChannel;
|
||||
import org.springframework.integration.endpoint.MessageEndpoint;
|
||||
import org.springframework.integration.endpoint.PollingConsumer;
|
||||
import org.springframework.integration.endpoint.SubscribingConsumerEndpoint;
|
||||
import org.springframework.integration.endpoint.EventDrivenConsumer;
|
||||
import org.springframework.integration.message.MessageHandler;
|
||||
import org.springframework.integration.scheduling.IntervalTrigger;
|
||||
import org.springframework.integration.scheduling.Trigger;
|
||||
@@ -146,7 +146,7 @@ public class ConsumerEndpointFactoryBean implements FactoryBean, BeanFactoryAwar
|
||||
if (channel instanceof SubscribableChannel) {
|
||||
Assert.isNull(trigger, "A trigger should not be specified for endpoint '" + this.beanName
|
||||
+ "', since '" + this.inputChannelName + "' is a SubscribableChannel (not pollable).");
|
||||
this.endpoint = new SubscribingConsumerEndpoint((SubscribableChannel) channel, this.handler);
|
||||
this.endpoint = new EventDrivenConsumer((SubscribableChannel) channel, this.handler);
|
||||
}
|
||||
else if (channel instanceof PollableChannel) {
|
||||
if (this.trigger == null) {
|
||||
|
||||
@@ -32,7 +32,7 @@ import org.springframework.integration.channel.SubscribableChannel;
|
||||
import org.springframework.integration.core.MessageChannel;
|
||||
import org.springframework.integration.endpoint.MessageEndpoint;
|
||||
import org.springframework.integration.endpoint.PollingConsumer;
|
||||
import org.springframework.integration.endpoint.SubscribingConsumerEndpoint;
|
||||
import org.springframework.integration.endpoint.EventDrivenConsumer;
|
||||
import org.springframework.integration.message.MessageHandler;
|
||||
import org.springframework.util.Assert;
|
||||
import org.springframework.util.StringUtils;
|
||||
@@ -100,7 +100,7 @@ public abstract class AbstractMethodAnnotationPostProcessor<T extends Annotation
|
||||
else if (inputChannel instanceof SubscribableChannel) {
|
||||
Assert.isTrue(pollerAnnotation == null,
|
||||
"The @Poller annotation should only be provided for a PollableChannel");
|
||||
endpoint = new SubscribingConsumerEndpoint((SubscribableChannel) inputChannel, handler);
|
||||
endpoint = new EventDrivenConsumer((SubscribableChannel) inputChannel, handler);
|
||||
}
|
||||
else {
|
||||
throw new IllegalArgumentException("unsupported channel type: [" + inputChannel.getClass() + "]");
|
||||
|
||||
@@ -33,7 +33,7 @@ import org.springframework.integration.core.MessageChannel;
|
||||
import org.springframework.integration.endpoint.MessageEndpoint;
|
||||
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.MethodInvokingSource;
|
||||
import org.springframework.integration.scheduling.IntervalTrigger;
|
||||
import org.springframework.integration.scheduling.Trigger;
|
||||
@@ -120,7 +120,7 @@ public class ChannelAdapterAnnotationPostProcessor implements MethodAnnotationPo
|
||||
return endpoint;
|
||||
}
|
||||
if (channel instanceof SubscribableChannel) {
|
||||
return new SubscribingConsumerEndpoint((SubscribableChannel) channel, handler);
|
||||
return new EventDrivenConsumer((SubscribableChannel) channel, handler);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -22,9 +22,12 @@ import org.springframework.integration.message.MessageHandler;
|
||||
import org.springframework.util.Assert;
|
||||
|
||||
/**
|
||||
* Message Endpoint that connects any {@link MessageHandler} implementation
|
||||
* to a {@link SubscribableChannel}.
|
||||
*
|
||||
* @author Mark Fisher
|
||||
*/
|
||||
public class SubscribingConsumerEndpoint extends AbstractEndpoint implements Lifecycle {
|
||||
public class EventDrivenConsumer extends AbstractEndpoint implements Lifecycle {
|
||||
|
||||
private final SubscribableChannel inputChannel;
|
||||
|
||||
@@ -35,7 +38,7 @@ public class SubscribingConsumerEndpoint extends AbstractEndpoint implements Lif
|
||||
private final Object lifecycleMonitor = new Object();
|
||||
|
||||
|
||||
public SubscribingConsumerEndpoint(SubscribableChannel inputChannel, MessageHandler handler) {
|
||||
public EventDrivenConsumer(SubscribableChannel inputChannel, MessageHandler handler) {
|
||||
Assert.notNull(inputChannel, "inputChannel must not be null");
|
||||
Assert.notNull(handler, "handler must not be null");
|
||||
this.inputChannel = inputChannel;
|
||||
@@ -28,7 +28,7 @@ import org.springframework.integration.core.MessagingException;
|
||||
import org.springframework.integration.endpoint.MessageEndpoint;
|
||||
import org.springframework.integration.endpoint.MessagingGateway;
|
||||
import org.springframework.integration.endpoint.PollingConsumer;
|
||||
import org.springframework.integration.endpoint.SubscribingConsumerEndpoint;
|
||||
import org.springframework.integration.endpoint.EventDrivenConsumer;
|
||||
import org.springframework.integration.message.ErrorMessage;
|
||||
import org.springframework.integration.message.MessageHandler;
|
||||
import org.springframework.integration.message.MessageDeliveryException;
|
||||
@@ -185,7 +185,7 @@ public abstract class AbstractMessagingGateway implements MessagingGateway, Mess
|
||||
}
|
||||
};
|
||||
if (this.replyChannel instanceof SubscribableChannel) {
|
||||
correlator = new SubscribingConsumerEndpoint(
|
||||
correlator = new EventDrivenConsumer(
|
||||
(SubscribableChannel) this.replyChannel, handler);
|
||||
}
|
||||
else if (this.replyChannel instanceof PollableChannel) {
|
||||
|
||||
Reference in New Issue
Block a user