org.zkoss.util
Class ScalableTimerTask

java.lang.Object
  extended by java.util.TimerTask
      extended by org.zkoss.util.ScalableTimerTask
All Implemented Interfaces:
java.lang.Runnable

public abstract class ScalableTimerTask
extends java.util.TimerTask

A task that can be scheduled for one-time execution by a scalable timer (ScalableTimer.

Since:
3.0.1
Author:
tomyeh

Constructor Summary
ScalableTimerTask()
           
 
Method Summary
 boolean cancel()
          Cancels this timer task.
abstract  void exec()
          The action to be performed by this timer task.
 void run()
          Invokes exec().
 
Methods inherited from class java.util.TimerTask
scheduledExecutionTime
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ScalableTimerTask

public ScalableTimerTask()
Method Detail

exec

public abstract void exec()
The action to be performed by this timer task. The derived class must override this method instead of run().


run

public final void run()
Invokes exec(). The derived class shall not override this method. Rather, override exec() instead.

Specified by:
run in interface java.lang.Runnable
Specified by:
run in class java.util.TimerTask

cancel

public boolean cancel()
Cancels this timer task.

Overrides:
cancel in class java.util.TimerTask
Returns:
true if this task is scheduled for one-time execution and has not yet run. Returns false if the task was scheduled for one-time execution and has already run.


Copyright © 2005-2009 Potix Corporation. All Rights Reserved. SourceForge.net Logo