API Overview API Index Package Overview Direct link to this page
JDK 1.6
  java.util. TimerTask View Source
Author(s)
Josh Bloch
Since
1.3
Version
1.11, 11/17/05
Serial
Hierarchy
 Object
      TimerTask
Implements
 Runnable
Subclasses
Description
publicabstract abstract class TimerTask
  A task that can be scheduled for one-time or repeated execution by a Timer.
See also:    Timer
Constructors
protected TimerTask ()
Creates a new timer task.
Methods
Hide/Show inherited methods
public boolean cancel ()
  Cancels this timer task.
publicabstract void run () [Specified in Runnable]
The action to be performed by this timer task.
public long scheduledExecutionTime ()
  Returns the scheduled execution time of the most recent actual execution of this task.
Fields
Hide/Show inherited fields
pack-privatefinalstatic int CANCELLED = "3"
This task has been cancelled (with a call to TimerTask.cancel).
pack-privatefinalstatic int EXECUTED = "2"
This non-repeating task has already executed (or is currently executing) and has not been cancelled.
pack-privatefinal Object lock
This object is used to control access to the TimerTask internals.
pack-private long nextExecutionTime
  Next execution time for this task in the format returned by System.currentTimeMillis, assuming this task is scheduled for execution.
pack-private long period
  Period in milliseconds for repeating tasks.
pack-privatefinalstatic int SCHEDULED = "1"
  This task is scheduled for execution.
pack-private int state
The state of this task, chosen from the constants below.
pack-privatefinalstatic int VIRGIN = "0"
This task has not yet been scheduled.
Nested Classes
Generated By: JavaOnTracks Doclet 0.1.4     ©Thibaut Colar