Renamed PollingConsumerEndpoint to PollingConsumer.
This commit is contained in:
@@ -27,7 +27,7 @@ import org.springframework.integration.channel.PollableChannel;
|
||||
import org.springframework.integration.channel.SubscribableChannel;
|
||||
import org.springframework.integration.core.MessageChannel;
|
||||
import org.springframework.integration.endpoint.MessageEndpoint;
|
||||
import org.springframework.integration.endpoint.PollingConsumerEndpoint;
|
||||
import org.springframework.integration.endpoint.PollingConsumer;
|
||||
import org.springframework.integration.endpoint.SubscribingConsumerEndpoint;
|
||||
import org.springframework.integration.message.MessageHandler;
|
||||
import org.springframework.integration.scheduling.IntervalTrigger;
|
||||
@@ -152,7 +152,7 @@ public class ConsumerEndpointFactoryBean implements FactoryBean, BeanFactoryAwar
|
||||
if (this.trigger == null) {
|
||||
this.trigger = new IntervalTrigger(0);
|
||||
}
|
||||
PollingConsumerEndpoint pollingEndpoint = new PollingConsumerEndpoint(
|
||||
PollingConsumer pollingEndpoint = new PollingConsumer(
|
||||
(PollableChannel) channel, this.handler);
|
||||
pollingEndpoint.setTrigger(this.trigger);
|
||||
pollingEndpoint.setMaxMessagesPerPoll(this.maxMessagesPerPoll);
|
||||
|
||||
@@ -31,7 +31,7 @@ import org.springframework.integration.channel.PollableChannel;
|
||||
import org.springframework.integration.channel.SubscribableChannel;
|
||||
import org.springframework.integration.core.MessageChannel;
|
||||
import org.springframework.integration.endpoint.MessageEndpoint;
|
||||
import org.springframework.integration.endpoint.PollingConsumerEndpoint;
|
||||
import org.springframework.integration.endpoint.PollingConsumer;
|
||||
import org.springframework.integration.endpoint.SubscribingConsumerEndpoint;
|
||||
import org.springframework.integration.message.MessageHandler;
|
||||
import org.springframework.util.Assert;
|
||||
@@ -89,7 +89,7 @@ public abstract class AbstractMethodAnnotationPostProcessor<T extends Annotation
|
||||
MessageChannel inputChannel = this.channelResolver.resolveChannelName(inputChannelName);
|
||||
Assert.notNull(inputChannel, "failed to resolve inputChannel '" + inputChannelName + "'");
|
||||
if (inputChannel instanceof PollableChannel) {
|
||||
PollingConsumerEndpoint pollingEndpoint = new PollingConsumerEndpoint(
|
||||
PollingConsumer pollingEndpoint = new PollingConsumer(
|
||||
(PollableChannel) inputChannel, handler);
|
||||
if (pollerAnnotation != null) {
|
||||
AnnotationConfigUtils.configurePollingEndpointWithPollerAnnotation(
|
||||
|
||||
@@ -31,7 +31,7 @@ import org.springframework.integration.channel.SubscribableChannel;
|
||||
import org.springframework.integration.consumer.MethodInvokingMessageHandler;
|
||||
import org.springframework.integration.core.MessageChannel;
|
||||
import org.springframework.integration.endpoint.MessageEndpoint;
|
||||
import org.springframework.integration.endpoint.PollingConsumerEndpoint;
|
||||
import org.springframework.integration.endpoint.PollingConsumer;
|
||||
import org.springframework.integration.endpoint.SourcePollingChannelAdapter;
|
||||
import org.springframework.integration.endpoint.SubscribingConsumerEndpoint;
|
||||
import org.springframework.integration.message.MethodInvokingSource;
|
||||
@@ -115,7 +115,7 @@ public class ChannelAdapterAnnotationPostProcessor implements MethodAnnotationPo
|
||||
Trigger trigger = (pollerAnnotation != null)
|
||||
? AnnotationConfigUtils.parseTriggerFromPollerAnnotation(pollerAnnotation)
|
||||
: new IntervalTrigger(0);
|
||||
PollingConsumerEndpoint endpoint = new PollingConsumerEndpoint((PollableChannel) channel, handler);
|
||||
PollingConsumer endpoint = new PollingConsumer((PollableChannel) channel, handler);
|
||||
endpoint.setTrigger(trigger);
|
||||
return endpoint;
|
||||
}
|
||||
|
||||
@@ -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 PollableChannel}.
|
||||
*
|
||||
* @author Mark Fisher
|
||||
*/
|
||||
public class PollingConsumerEndpoint extends AbstractPollingEndpoint {
|
||||
public class PollingConsumer extends AbstractPollingEndpoint {
|
||||
|
||||
private final PollableChannel inputChannel;
|
||||
|
||||
@@ -33,7 +36,7 @@ public class PollingConsumerEndpoint extends AbstractPollingEndpoint {
|
||||
private volatile long receiveTimeout = 1000;
|
||||
|
||||
|
||||
public PollingConsumerEndpoint(PollableChannel inputChannel, MessageHandler handler) {
|
||||
public PollingConsumer(PollableChannel inputChannel, MessageHandler handler) {
|
||||
Assert.notNull(inputChannel, "inputChannel must not be null");
|
||||
Assert.notNull(handler, "handler must not be null");
|
||||
this.inputChannel = inputChannel;
|
||||
@@ -27,7 +27,7 @@ import org.springframework.integration.core.MessageChannel;
|
||||
import org.springframework.integration.core.MessagingException;
|
||||
import org.springframework.integration.endpoint.MessageEndpoint;
|
||||
import org.springframework.integration.endpoint.MessagingGateway;
|
||||
import org.springframework.integration.endpoint.PollingConsumerEndpoint;
|
||||
import org.springframework.integration.endpoint.PollingConsumer;
|
||||
import org.springframework.integration.endpoint.SubscribingConsumerEndpoint;
|
||||
import org.springframework.integration.message.ErrorMessage;
|
||||
import org.springframework.integration.message.MessageHandler;
|
||||
@@ -189,7 +189,7 @@ public abstract class AbstractMessagingGateway implements MessagingGateway, Mess
|
||||
(SubscribableChannel) this.replyChannel, handler);
|
||||
}
|
||||
else if (this.replyChannel instanceof PollableChannel) {
|
||||
PollingConsumerEndpoint endpoint = new PollingConsumerEndpoint(
|
||||
PollingConsumer endpoint = new PollingConsumer(
|
||||
(PollableChannel) this.replyChannel, handler);
|
||||
endpoint.setTaskScheduler(this.taskScheduler);
|
||||
endpoint.afterPropertiesSet();
|
||||
|
||||
Reference in New Issue
Block a user