@DisallowConcurrentExecution public class ERQSJobSupervisor extends ERQSAbstractJob
Every job handled by the supervisor has a group starting by GROUP_NAME_PREFIX. The goal is to let developers to add any job directly, aka not linked to a job description. For that reason, by convention, the jobs not handled by the supervisor must have a group not starting with GROUP_NAME_PREFIX
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_SLEEP_DURATION |
static String |
GROUP_NAME_PREFIX |
static String |
TRIGGER_SUFFIX |
log| Constructor and Description |
|---|
ERQSJobSupervisor() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addJob2Scheduler(ERQSJobDescription job2Add)
Add a job to the scheduler described the job description job2Add.
|
protected void |
addOrModifyJobs(NSArray<? extends ERQSJobDescription> jobs2Check)
From jobs2Check (a fresh list of ERQSJobDescription objects), addOrModifyJobs checks if jobs must be added or modified.
|
protected String |
buildGroup(String group) |
protected org.quartz.JobDetail |
buildJobDetail(ERQSJobDescription jobDescription)
Return a job detail built from a ERQSJobDescription object
|
protected org.quartz.Trigger |
buildTrigger(String name,
String group,
String cronExpression,
org.quartz.JobDataMap map,
org.quartz.JobDetail job) |
protected org.quartz.Trigger |
buildTriggerForJob(ERQSJobDescription jobDescription,
org.quartz.JobDetail job)
Return a trigger built from a ERQSJobDescription object and a JobDetail object
|
protected String |
buildTriggerName(String name) |
void |
execute(org.quartz.JobExecutionContext jobexecutioncontext) |
protected Class<? extends org.quartz.Job> |
getClass(String path) |
org.quartz.JobKey |
getJobKeyForJobDescription(ERQSJobDescription aJobDescription) |
protected Set<org.quartz.JobKey> |
getScheduledJobKeys()
Return a a set of jobs handled currently by Quartz.
|
protected boolean |
isJobDescriptionValid(ERQSJobDescription aJobDescription) |
protected void |
modifyJob(ERQSJobDescription job2Check,
org.quartz.JobDetail job) |
com.webobjects.eocontrol.EOEditingContext |
newEditingContext()
Called by
editingContext(). |
protected void |
removeObsoleteJobs(NSArray<? extends ERQSJobDescription> jobs2Check)
From jobs2Check (a fresh list of ERQSJobDescription objects), removeJobs checks if jobs must be removed.
|
editingContext, getJobContext, getScheduler, getSchedulerFPInstance, setResultMessagepublic static final String TRIGGER_SUFFIX
public static final int DEFAULT_SLEEP_DURATION
public static final String GROUP_NAME_PREFIX
public void execute(org.quartz.JobExecutionContext jobexecutioncontext)
throws org.quartz.JobExecutionException
execute in interface org.quartz.Jobexecute in class ERQSAbstractJoborg.quartz.JobExecutionExceptionprotected Set<org.quartz.JobKey> getScheduledJobKeys()
protected void removeObsoleteJobs(NSArray<? extends ERQSJobDescription> jobs2Check)
jobs2Check - list of ERQSJobDescription objectsprotected void addOrModifyJobs(NSArray<? extends ERQSJobDescription> jobs2Check)
jobs2Check - list of ERQSJobDescription objectspublic org.quartz.JobKey getJobKeyForJobDescription(ERQSJobDescription aJobDescription)
protected void addJob2Scheduler(ERQSJobDescription job2Add)
job2Add - job to addprotected void modifyJob(ERQSJobDescription job2Check, org.quartz.JobDetail job)
protected org.quartz.JobDetail buildJobDetail(ERQSJobDescription jobDescription)
jobDescription - protected org.quartz.Trigger buildTriggerForJob(ERQSJobDescription jobDescription, org.quartz.JobDetail job)
jobDescription - (we suppose that jobDescription is a subclass of ERXGenericRecord or a non persistent object)job - protected org.quartz.Trigger buildTrigger(String name, String group, String cronExpression, org.quartz.JobDataMap map, org.quartz.JobDetail job)
protected boolean isJobDescriptionValid(ERQSJobDescription aJobDescription)
public com.webobjects.eocontrol.EOEditingContext newEditingContext()
ERQSAbstractJobeditingContext(). Should not be called directly except if you need several
editingContext.newEditingContext in class ERQSAbstractJobCopyright © 2002 – 2020 Project Wonder.