org.bitrepository.service.workflow
Class JobTimerTask
java.lang.Object
java.util.TimerTask
org.bitrepository.service.workflow.JobTimerTask
- All Implemented Interfaces:
- Runnable
public class JobTimerTask
- extends TimerTask
A timer task encapsulating a workflow.
Used for scheduling workflows to run continuously at a given interval.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JobTimerTask
public JobTimerTask(long interval,
SchedulableJob job,
List<JobEventListener> jobListeners)
- Initialise trigger.
- Parameters:
interval
- The interval between triggering events in milliseconds.job:
- The job.
getNextRun
public Date getNextRun()
- Returns:
- The date for the next time the encapsulated workflow should run.
getIntervalBetweenRuns
public long getIntervalBetweenRuns()
- Returns:
- The interval between the runs in millis.
getDescription
public String getDescription()
runJob
public String runJob()
- Runs the job.
Resets the date for the next run of the job.
- Returns:
- String
getName
public String getName()
- Returns:
- The name of the job.
getWorkflowID
public JobID getWorkflowID()
run
public void run()
- Specified by:
run
in interface Runnable
- Specified by:
run
in class TimerTask
Copyright © 2010-2013 The State and University Library, The Royal Library and The State Archives, Denmark. All Rights Reserved.