Save This Page
Home » apache-harmony-6.0-src-r917296-snapshot » java » util » [javadoc | source]
java.util
abstract public class: TimerTask [javadoc | source]
java.lang.Object
   java.util.TimerTask

All Implemented Interfaces:
    Runnable

Direct Known Subclasses:
   

The {@code TimerTask} class represents a task to run at a specified time. The task may be run once or repeatedly.
Field Summary
final  Object lock     
 boolean cancelled     
 long when     
 long period     
 boolean fixedRate     
Constructor:
 protected TimerTask() 
Method from java.util.TimerTask Summary:
cancel,   getWhen,   isScheduled,   run,   scheduledExecutionTime,   setScheduledTime
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from java.util.TimerTask Detail:
 public boolean cancel() 
    Cancels the {@code TimerTask} and removes it from the {@code Timer}'s queue. Generally, it returns {@code false} if the call did not prevent a {@code TimerTask} from running at least once. Subsequent calls have no effect.
 long getWhen() 
 boolean isScheduled() 
 abstract public  void run()
    The task to run should be specified in the implementation of the {@code run()} method.
 public long scheduledExecutionTime() 
    Returns the scheduled execution time. If the task execution is in progress it returns the execution time of the ongoing task. Tasks which have not yet run return an undefined value.
  void setScheduledTime(long time)