List of usage examples for org.springframework.scheduling.concurrent ScheduledExecutorTask getRunnable
public Runnable getRunnable()
From source file:org.springframework.scheduling.concurrent.ScheduledExecutorFactoryBean.java
/** * Determine the actual Runnable to schedule for the given task. * <p>Wraps the task's Runnable in a * {@link org.springframework.scheduling.support.DelegatingExceptionProofRunnable} * if necessary, according to the// w w w . j av a 2s .com * {@link #setContinueScheduledExecutionAfterException "continueScheduledExecutionAfterException"} * flag. * @param task the ScheduledExecutorTask to schedule * @return the actual Runnable to schedule (may be a decorator) */ protected Runnable getRunnableToSchedule(ScheduledExecutorTask task) { if (this.continueScheduledExecutionAfterException) { return new DelegatingExceptionProofRunnable(task.getRunnable()); } else { return task.getRunnable(); } }