INT-1509, removed depndency on TaskExecutor in favor of Executor
This commit is contained in:
@@ -18,13 +18,13 @@ package org.springframework.integration.endpoint;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.concurrent.Callable;
|
||||
import java.util.concurrent.Executor;
|
||||
import java.util.concurrent.ScheduledFuture;
|
||||
|
||||
import org.aopalliance.aop.Advice;
|
||||
import org.springframework.aop.framework.ProxyFactory;
|
||||
import org.springframework.beans.factory.BeanClassLoaderAware;
|
||||
import org.springframework.core.task.SyncTaskExecutor;
|
||||
import org.springframework.core.task.TaskExecutor;
|
||||
import org.springframework.integration.MessageHandlingException;
|
||||
import org.springframework.integration.MessagingException;
|
||||
import org.springframework.integration.channel.MessagePublishingErrorHandler;
|
||||
@@ -43,7 +43,7 @@ import org.springframework.util.ErrorHandler;
|
||||
*/
|
||||
public abstract class AbstractPollingEndpoint extends AbstractEndpoint implements BeanClassLoaderAware {
|
||||
|
||||
private volatile TaskExecutor taskExecutor = new SyncTaskExecutor();
|
||||
private volatile Executor taskExecutor = new SyncTaskExecutor();
|
||||
|
||||
private volatile ErrorHandler errorHandler;
|
||||
|
||||
@@ -84,7 +84,7 @@ public abstract class AbstractPollingEndpoint extends AbstractEndpoint implement
|
||||
return;
|
||||
}
|
||||
Assert.notNull(this.pollerMetadata.getTrigger(), "Trigger is required");
|
||||
TaskExecutor providedExecutor = this.pollerMetadata.getTaskExecutor();
|
||||
Executor providedExecutor = this.pollerMetadata.getTaskExecutor();
|
||||
if (providedExecutor != null) {
|
||||
this.taskExecutor = providedExecutor;
|
||||
}
|
||||
|
||||
@@ -17,9 +17,9 @@
|
||||
package org.springframework.integration.scheduling;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.concurrent.Executor;
|
||||
|
||||
import org.aopalliance.aop.Advice;
|
||||
import org.springframework.core.task.TaskExecutor;
|
||||
import org.springframework.scheduling.Trigger;
|
||||
import org.springframework.scheduling.support.PeriodicTrigger;
|
||||
|
||||
@@ -39,7 +39,7 @@ public class PollerMetadata {
|
||||
|
||||
private List<Advice> adviceChain;
|
||||
|
||||
private volatile TaskExecutor taskExecutor;
|
||||
private volatile Executor taskExecutor;
|
||||
|
||||
public void setTrigger(Trigger trigger) {
|
||||
this.trigger = trigger;
|
||||
@@ -82,11 +82,11 @@ public class PollerMetadata {
|
||||
return this.adviceChain;
|
||||
}
|
||||
|
||||
public void setTaskExecutor(TaskExecutor taskExecutor) {
|
||||
public void setTaskExecutor(Executor taskExecutor) {
|
||||
this.taskExecutor = taskExecutor;
|
||||
}
|
||||
|
||||
public TaskExecutor getTaskExecutor() {
|
||||
public Executor getTaskExecutor() {
|
||||
return this.taskExecutor;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user