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());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user