Class JobEntryQuartz
java.lang.Object
org.apache.turbine.services.schedule.JobEntryQuartz
- All Implemented Interfaces:
- Comparable<JobEntry>,- JobEntry,- org.quartz.Job
This implements a Turbine scheduled job model for the 
QuartzScheduler.- Author:
- Thomas Vandahl
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final Stringthe default Quartz schedule group name for Turbine jobs
- 
Constructor SummaryConstructorsConstructorDescriptionDefault constructorJobEntryQuartz(org.quartz.Trigger jobTrigger) ConstructorJobEntryQuartz(org.quartz.Trigger jobTrigger, org.quartz.JobDetail jobDetail) Constructor
- 
Method SummaryModifier and TypeMethodDescriptionvoidCalculate how long before the next runtime.intvoidexecute(org.quartz.JobExecutionContext context) org.quartz.JobDetailintgetJobId()Get the value of jobId.org.quartz.TriggerGet the next runtime for this job as a String.Gets the next runtime as a datelongGet the next runtime for this job as a long.getTask()Get the value of task.booleanisActive()Check to see if job is currently active/runningbooleanisNew()Return true, if the entry is not yet persistedvoidsetActive(boolean isActive) Sets whether the job is running.voidsetJobId(int v) Set the value of jobId.voidsetJobTrigger(org.quartz.Trigger jobTrigger) voidSet the value of task.
- 
Field Details- 
DEFAULT_JOB_GROUP_NAMEthe default Quartz schedule group name for Turbine jobs- See Also:
 
 
- 
- 
Constructor Details- 
JobEntryQuartzpublic JobEntryQuartz()Default constructor
- 
JobEntryQuartzConstructor- Parameters:
- jobTrigger- Job time table
 
- 
JobEntryQuartzConstructor- Parameters:
- jobTrigger- Job time table
- jobDetail- job details
 
 
- 
- 
Method Details- 
isNewReturn true, if the entry is not yet persisted
- 
getJobIdGet the value of jobId.
- 
setJobIdSet the value of jobId.
- 
getTaskGet the value of task.
- 
setTaskSet the value of task.
- 
getJobTrigger- Returns:
- the jobTrigger
 
- 
setJobTrigger- Parameters:
- jobTrigger- the jobTrigger to set
 
- 
getJobDetail- Returns:
- the jobDetail
 
- 
compareTo- Specified by:
- compareToin interface- Comparable<JobEntry>
- See Also:
 
- 
setActiveDescription copied from interface:JobEntrySets whether the job is running.
- 
isActiveDescription copied from interface:JobEntryCheck to see if job is currently active/running
- 
getNextRuntimeDescription copied from interface:JobEntryGet the next runtime for this job as a long.- Specified by:
- getNextRuntimein interface- JobEntry
- Returns:
- The next run time as a long.
- See Also:
 
- 
getNextRunDateDescription copied from interface:JobEntryGets the next runtime as a date- Specified by:
- getNextRunDatein interface- JobEntry
- Returns:
- Next run date
- See Also:
 
- 
getNextRunAsStringDescription copied from interface:JobEntryGet the next runtime for this job as a String.- Specified by:
- getNextRunAsStringin interface- JobEntry
- Returns:
- The next run time as a String.
- See Also:
 
- 
calcRunTimeDescription copied from interface:JobEntryCalculate how long before the next runtime.
 The runtime determines it's position in the job queue. Here's the logic:
 1. Create a date the represents when this job is to run.
 2. If this date has expired, them "roll" appropriate date fields forward to the next date.
 3. Calculate the diff in time between the current time and the next run time.- Specified by:
- calcRunTimein interface- JobEntry
- Throws:
- TurbineException- a generic exception.
- See Also:
 
- 
execute- Specified by:
- executein interface- org.quartz.Job
- Throws:
- org.quartz.JobExecutionException
- See Also:
 
 
-