planet.util.timer
Class TimerTaskImpl

java.lang.Object
  extended byplanet.util.timer.TimerTaskImpl
All Implemented Interfaces:
java.io.Serializable, TimerTask
Direct Known Subclasses:
ChordNode.FixFingerTask, ChordNode.StabilizeTask, SimulationTimerTest.TestTimerTask, SymphonyNode.StabilizeTask

public class TimerTaskImpl
extends java.lang.Object
implements TimerTask

This abstract implementation is only usefull for simulation environment.

Author:
Jordi Pujol Date: 07/05/2004
See Also:
Serialized Form

Constructor Summary
TimerTaskImpl(boolean periodic)
          Initialize this TimerTask.
 
Method Summary
 boolean cancel()
          Cancells the actual TimerTask.
 boolean isFinished()
          Inform if this TimerTask has been cancelled.
 void run()
          Implement the job to do for activation of this TimerTask.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TimerTaskImpl

public TimerTaskImpl(boolean periodic)
Initialize this TimerTask.

Parameters:
periodic - If this task is periodic.
Method Detail

cancel

public boolean cancel()
Cancells the actual TimerTask. Returs true always if it prevents any activation of this TimerTask.

Specified by:
cancel in interface TimerTask
Returns:
true if and only if it prevents one or more activations of this TimerTask. false in other case.
See Also:
TimerTask.cancel()

run

public void run()
Implement the job to do for activation of this TimerTask. The concrete implementations must include this line:
    super.run();
 
to inform when this task has been executed.

Specified by:
run in interface TimerTask
See Also:
TimerTask.run()

isFinished

public boolean isFinished()
Inform if this TimerTask has been cancelled.

Specified by:
isFinished in interface TimerTask
Returns:
true if this TimerTask has been cancelled.
See Also:
TimerTask.isFinished()


NAVBAR ======= -->