com.ccg.util
Interface Schedulable

All Superinterfaces:
Runnable
All Known Implementing Classes:
ScheduleEntry

public interface Schedulable
extends Runnable

Interface defining the methods which a scheduable item must implement. All objects added to a Scheduler must provide the methods defined in this interface. This types of objects are intended to allow something to be Runnable.run() periodically based on the objects getDelayMillis() delay period.

Since:
1.0
Version:
$Revision: 1.4 $
Author:
$Author: pkb $
See Also:
ScheduleEntry, getDelayMillis()

Method Summary
 int getDelayMillis()
          Get delay (in milliseconds) between runs.
 
Methods inherited from interface java.lang.Runnable
run
 

Method Detail

getDelayMillis

int getDelayMillis()
Get delay (in milliseconds) between runs. All Schedulable objects must provide a run() method. These run() methods are similar to threads except the run() method should never block or run indefinitely (it should do something fairly quickly and then exit). This method indicates how much of a delay (in milliseconds) there should be before the Scheduler invokes the run() method. This allows one to control how often the Schedulable item is run.

Returns:
How many milliseconds to wait before invoking the Schedulable objects run method. Return 0 if you no longer need to continue running (you will then be removed from the Scheduler's table of Schedulable objects).
Since:
1.0
See Also:
ScheduleEntry, Scheduler


Copyright 1998-1998-2006 null. All Rights Reserved.