scheduling.concurrent
package which is based on Java 5's java.util.concurrent.ExecutorService
@Deprecated public class DelegatingTimerTask extends TimerTask
TimerTask
adapter that delegates to a
given Runnable
.
This is often preferable to deriving from TimerTask, to be able to implement an interface rather than extend an abstract base class.
Constructor and Description |
---|
DelegatingTimerTask(Runnable delegate)
Deprecated.
Create a new DelegatingTimerTask.
|
Modifier and Type | Method and Description |
---|---|
Runnable |
getDelegate()
Deprecated.
Return the wrapped Runnable implementation.
|
void |
run()
Deprecated.
Delegates execution to the underlying Runnable, catching any exception
or error thrown in order to continue scheduled execution.
|
cancel, scheduledExecutionTime
public DelegatingTimerTask(Runnable delegate)
delegate
- the Runnable implementation to delegate topublic final Runnable getDelegate()