Class Scheduler
java.lang.Object
|
+----Scheduler
- public class Scheduler
- extends Object
- implements Runnable
This class implements a scheduler to do long jobs.
A job is run in a thread, and the scheduler keeps
track of its status, thus preventing multiple
invocations of the method doJob().
- See Also:
- Job
-
job
- object implementing the doJob() method.
-
thread
- scheduler's thread
-
Scheduler(Job)
- Constructs a scheduler for a particular job doer.
-
run()
- Runs the job in a thread.
-
scheduleJob()
- Schedules a job and returns.
job
Job job
- object implementing the doJob() method.
thread
Thread thread
- scheduler's thread
Scheduler
public Scheduler(Job job)
- Constructs a scheduler for a particular job doer.
- Parameters:
- job - object implementing the doJob() method.
run
public void run()
- Runs the job in a thread.
scheduleJob
public synchronized void scheduleJob()
- Schedules a job and returns.