INT-1758 deprecated setPollerMetadata() on AbstractPollingEndpoint
This commit is contained in:
@@ -30,6 +30,7 @@ import org.springframework.integration.MessageHandlingException;
|
||||
import org.springframework.integration.MessagingException;
|
||||
import org.springframework.integration.channel.MessagePublishingErrorHandler;
|
||||
import org.springframework.integration.message.ErrorMessage;
|
||||
import org.springframework.integration.scheduling.PollerMetadata;
|
||||
import org.springframework.integration.support.channel.BeanFactoryChannelResolver;
|
||||
import org.springframework.integration.util.ErrorHandlingTaskExecutor;
|
||||
import org.springframework.scheduling.Trigger;
|
||||
@@ -46,7 +47,7 @@ import org.springframework.util.ErrorHandler;
|
||||
public abstract class AbstractPollingEndpoint extends AbstractEndpoint implements BeanClassLoaderAware {
|
||||
|
||||
private volatile Executor taskExecutor = new SyncTaskExecutor();
|
||||
|
||||
|
||||
private volatile ErrorHandler errorHandler;
|
||||
|
||||
private volatile Trigger trigger = new PeriodicTrigger(10);
|
||||
@@ -70,6 +71,17 @@ public abstract class AbstractPollingEndpoint extends AbstractEndpoint implement
|
||||
this.setPhase(Integer.MAX_VALUE);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated As of release 2.0.2, use individual setters
|
||||
*/
|
||||
public void setPollerMetadata(PollerMetadata pollerMetadata){
|
||||
Assert.notNull(pollerMetadata, "'pollerMetadata' must not be null.");
|
||||
this.setAdviceChain(pollerMetadata.getAdviceChain());
|
||||
this.setMaxMessagesPerPoll(pollerMetadata.getMaxMessagesPerPoll());
|
||||
this.setTaskExecutor(pollerMetadata.getTaskExecutor());
|
||||
this.setTrigger(pollerMetadata.getTrigger());
|
||||
}
|
||||
|
||||
public void setTaskExecutor(Executor taskExecutor) {
|
||||
this.taskExecutor = (taskExecutor != null ? taskExecutor : new SyncTaskExecutor());
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
package org.springframework.integration.ws.config;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
@@ -27,7 +27,6 @@ import org.springframework.context.support.ClassPathXmlApplicationContext;
|
||||
import org.springframework.integration.endpoint.AbstractEndpoint;
|
||||
import org.springframework.integration.endpoint.EventDrivenConsumer;
|
||||
import org.springframework.integration.endpoint.PollingConsumer;
|
||||
import org.springframework.integration.scheduling.PollerMetadata;
|
||||
import org.springframework.integration.ws.MarshallingWebServiceOutboundGateway;
|
||||
import org.springframework.integration.ws.SimpleWebServiceOutboundGateway;
|
||||
import org.springframework.oxm.Marshaller;
|
||||
|
||||
Reference in New Issue
Block a user