|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apertereports.backbone.scheduler.CyclicReportOrderScheduler
public class CyclicReportOrderScheduler
A utility class that can schedule cyclic report generation with a configured CronExpression.
The scheduleCyclicReportOrder method simply takes the CyclicReportOrder object and
use the cron expression it contains to schedule a CyclicReportOrderJob task.
The scheduler starts immediately after application starts and invokes scanForCyclicReportOrders. The method unschedules all jobs previously scheduled, fetches the cyclic reports form database and schedules them again. This way the previous jobs named after the instance id are removed. The database identifier can vary over time.
| Constructor Summary | |
|---|---|
CyclicReportOrderScheduler()
|
|
| Method Summary | |
|---|---|
static void |
rescheduleCyclicReportOrder(CyclicReportOrder order)
Reschedule a given report order. |
static void |
scanForCyclicReportOrders()
Loads all cyclic reports from database and schedules them in a Quartz scheduler. |
static void |
scheduleCyclicReportOrder(CyclicReportOrder order)
Schedules a CyclicReportOrderJob for a given cyclic report order. |
static void |
unscheduleCyclicReportOrder(CyclicReportOrder order)
Unschedules previously scheduled cyclic report order. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CyclicReportOrderScheduler()
| Method Detail |
|---|
public static void rescheduleCyclicReportOrder(CyclicReportOrder order)
throws org.quartz.SchedulerException
order - A report order
org.quartz.SchedulerException - on Quartz error
public static void scheduleCyclicReportOrder(CyclicReportOrder order)
throws org.quartz.SchedulerException
CyclicReportOrderJob for a given cyclic report order. The CronTrigger is initialized
with a cron specification taken from the instance.
order - The instance of cyclic report order
org.quartz.SchedulerException - on Quartz error
public static void unscheduleCyclicReportOrder(CyclicReportOrder order)
throws org.quartz.SchedulerException
order - An instance of cyclic report order to unschedule
org.quartz.SchedulerException - on Quartz errorpublic static void scanForCyclicReportOrders()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||