giacomo 2003/09/04 08:59:09
Modified: src/blocks/cron/java/org/apache/cocoon/components/cron
JobScheduler.java
Log:
added management functionallity
Revision Changes Path
1.4 +36 -22
cocoon-2.1/src/blocks/cron/java/org/apache/cocoon/components/cron/JobScheduler.java
Index: JobScheduler.java
===================================================================
RCS file:
/home/cvs/cocoon-2.1/src/blocks/cron/java/org/apache/cocoon/components/cron/JobScheduler.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -b -u -r1.3 -r1.4
--- JobScheduler.java 4 Sep 2003 12:42:44 -0000 1.3
+++ JobScheduler.java 4 Sep 2003 15:59:09 -0000 1.4
@@ -71,6 +71,20 @@
String ROLE = JobScheduler.class.getName();
/**
+ * Get the names of all scheduled jobs.
+ *
+ * @return state of execution successfullness
+ */
+ String[] getJobNames();
+
+ /**
+ * Get the JobSchedulerEntry for a scheduled job
+ *
+ * @return the entry
+ */
+ JobSchedulerEntry getJobSchedulerEntry(String jobname);
+
+ /**
* Schedule a periodic job.
* The job is started the first time when the period has passed.
* Note that if a Job already has same name then it is overwritten.
@@ -141,51 +155,51 @@
throws CascadingException;
/**
- * Fire a target once immediately
+ * Fire a job once immediately
*
* @param jobrole The Avalon components role name of the job itself
*
- * @return state of execution successfullness
+ * @return success state adding the job
*/
boolean fireJob(String jobrole);
/**
- * Fire a target once immediately
+ * Fire a CronJob once immediately
*
- * @param jobrole The Avalon components role name of the job itself
- * @param params Additional Parameters to setup CronJob
- * @param objects A Map with additional object to setup CronJob
+ * @param job The job object itself. It must implement either CronJob,
Runnable or might also be an implementation
+ * specific class (i.e. org.quartz.Job)
*
- * @return state of execution successfullness
+ * @return whether the job has been successfully started
*/
- boolean fireJob(String jobrole, Parameters params, Map objects)
- throws CascadingException;
+ boolean fireJob(Object job);
/**
- * Fire a CronJob once immediately
+ * Fire a job once immediately
*
- * @param job The job object itself. It must implement either CronJob,
Runnable or might also be an implementation
- * specific class (i.e. org.quartz.Job)
+ * @param jobrole The Avalon components role name of the job itself
+ * @param params Additional Parameters to setup CronJob
+ * @param objects A Map with additional object to setup CronJob
*
- * @return state of execution successfullness
+ * @return whether the job has been successfully started
*/
- boolean fireJob(Object job);
+ boolean fireJob(String jobrole, Parameters params, Map objects)
+ throws CascadingException;
/**
- * Fire a target once immediately
+ * Fire a job once immediately
*
* @param job The job object itself. It must implement either CronJob,
Runnable or might also be an implementation
* specific class (i.e. org.quartz.Job)
* @param params Additional Parameters to setup CronJob
* @param objects A Map with additional object to setup CronJob
*
- * @return state of execution successfullness
+ * @return whether the job has been successfully started
*/
boolean fireJob(Object job, Parameters params, Map objects)
throws CascadingException;
/**
- * Fire a target once at a specific date
+ * Fire a job once at a specific date
*
* @param date The date this job should be scheduled
* @param name the name of the job
@@ -195,7 +209,7 @@
throws CascadingException;
/**
- * Fire a target once immediately
+ * Fire a job once immediately
*
* @param date The date this job should be scheduled
* @param name the name of the job
@@ -218,7 +232,7 @@
throws CascadingException;
/**
- * Fire a target once immediately
+ * Fire a job once immediately
*
* @param date The date this job should be scheduled
* @param name the name of the job