public abstract class AbstractSchedTaskJobDelegate extends Object implements SchedTaskJobDelegate
Modifier and Type | Field and Description |
---|---|
protected AuditManager |
auditManager
Audit manager.
|
protected EntityFactory |
entityFactory |
protected boolean |
interrupt |
protected boolean |
interrupted |
protected static org.slf4j.Logger |
LOG |
protected NotificationManager |
notificationManager
Notification manager.
|
protected ApplicationEventPublisher |
publisher |
protected SchedTask |
task
The actual task to be executed.
|
protected TaskDAO |
taskDAO
Task DAO.
|
protected TaskDataBinder |
taskDataBinder |
protected TaskExecDAO |
taskExecDAO
Task execution DAO.
|
Constructor and Description |
---|
AbstractSchedTaskJobDelegate() |
Modifier and Type | Method and Description |
---|---|
protected abstract String |
doExecute(boolean dryRun,
org.quartz.JobExecutionContext context)
The actual execution, delegated to child classes.
|
void |
execute(String taskKey,
boolean dryRun,
org.quartz.JobExecutionContext context)
Executes a Quartz Job to run the given Task.
|
protected boolean |
hasToBeRegistered(TaskExec execution)
Template method to determine whether this job's task execution has to be persisted or not.
|
void |
interrupt() |
boolean |
isInterrupted() |
protected void |
register(TaskExec execution) |
protected void |
setStatus(String status) |
protected static final org.slf4j.Logger LOG
protected SchedTask task
@Autowired protected TaskExecDAO taskExecDAO
@Autowired protected TaskDAO taskDAO
@Autowired protected EntityFactory entityFactory
@Autowired protected TaskDataBinder taskDataBinder
@Autowired protected NotificationManager notificationManager
@Autowired protected AuditManager auditManager
@Autowired protected ApplicationEventPublisher publisher
protected boolean interrupt
protected boolean interrupted
protected void setStatus(String status)
public void interrupt()
interrupt
in interface JobDelegate
public boolean isInterrupted()
isInterrupted
in interface JobDelegate
@Transactional public void execute(String taskKey, boolean dryRun, org.quartz.JobExecutionContext context) throws org.quartz.JobExecutionException
SchedTaskJobDelegate
execute
in interface SchedTaskJobDelegate
taskKey
- Task key to rundryRun
- indicates if execution shall be simulated with no actual changescontext
- Quartz' execution context, can be used to pass parameters to the joborg.quartz.JobExecutionException
- if anything goes wrongprotected abstract String doExecute(boolean dryRun, org.quartz.JobExecutionContext context) throws org.quartz.JobExecutionException
dryRun
- whether to actually touch the datacontext
- Quartz' execution context, can be used to pass parameters to the joborg.quartz.JobExecutionException
- if anything goes wrongprotected boolean hasToBeRegistered(TaskExec execution)
execution
- task executionprotected void register(TaskExec execution)
Copyright © 2010–2023 The Apache Software Foundation. All rights reserved.