TaskScheduler no longer defines a setErrorHandler() method.

This commit is contained in:
Mark Fisher
2008-09-15 14:11:29 +00:00
parent ccb9ba4197
commit 473ac068d1
2 changed files with 3 additions and 3 deletions

View File

@@ -317,7 +317,9 @@ public class DefaultMessageBus implements MessageBus, ApplicationContextAware, A
for (Lifecycle gateway : this.lifecycleGateways) {
gateway.start();
}
this.taskScheduler.setErrorHandler(new MessagePublishingErrorHandler(this.getErrorChannel()));
if (this.taskScheduler instanceof ProviderTaskScheduler) {
((ProviderTaskScheduler) this.taskScheduler).setErrorHandler(new MessagePublishingErrorHandler(this.getErrorChannel()));
}
this.taskScheduler.start();
}
this.running = true;

View File

@@ -33,6 +33,4 @@ public interface TaskScheduler extends SchedulingTaskExecutor, Lifecycle {
boolean cancel(Runnable task, boolean mayInterruptIfRunning);
void setErrorHandler(ErrorHandler errorHandler);
}