public class JobDetailImpl extends Object implements Cloneable, Serializable, JobDetail
Conveys the detail properties of a given Job instance.
Quartz does not store an actual instance of a Job class, but instead allows you to define an instance of one, through the use of a
JobDetail.
Jobs have a name and group associated with them, which should uniquely identify them within a single .
Scheduler
Triggers are the 'mechanism' by which Jobs are scheduled. Many Triggers can point to the same
Job, but a single Trigger can only point to one Job.
| Constructor and Description |
|---|
JobDetailImpl()
Create a
JobDetail with no specified name or group, and the default settings of all the other properties. |
| Modifier and Type | Method and Description |
|---|---|
Object |
clone() |
boolean |
equals(Object obj) |
String |
getDescription()
Return the description given to the
Job instance by its creator (if any). |
JobBuilder |
getJobBuilder()
Get a
JobBuilder that is configured to produce a JobDetail identical to this one. |
Class<? extends Job> |
getJobClass()
Get the instance of
Job that will be executed. |
JobDataMap |
getJobDataMap()
Get the
JobDataMap that is associated with the Job. |
String |
getName()
Get the name of this
Job. |
int |
hashCode() |
boolean |
isConcurrencyAllowed()
The default behavior is to veto any job is currently running concurrent.
|
void |
setDescription(String description)
Set a description for the
Job instance - may be useful for remembering/displaying the purpose of the job, though the description has
no meaning to Quartz. |
void |
setIsConcurrencyAllowed(boolean isConcurrencyAllowed) |
void |
setJobClass(Class<? extends Job> jobClass)
Set the instance of
Job that will be executed. |
void |
setJobDataMap(JobDataMap jobDataMap)
Set the
JobDataMap to be associated with the Job. |
void |
setName(String name)
Set the name of this
Job. |
String |
toString() |
public JobDetailImpl()
Create a JobDetail with no specified name or group, and the default settings of all the other properties.
Note that the setName(String),#setGroup(String)and setJobClass(Class)methods must be called before the job can be
placed into a Scheduler
public String getName()
Get the name of this Job.
public void setName(String name)
Set the name of this Job.
IllegalArgumentException - if name is null or empty.public String getDescription()
JobDetail
Return the description given to the Job instance by its creator (if any).
getDescription in interface JobDetailpublic void setDescription(String description)
Set a description for the Job instance - may be useful for remembering/displaying the purpose of the job, though the description has
no meaning to Quartz.
public Class<? extends Job> getJobClass()
JobDetail
Get the instance of Job that will be executed.
getJobClass in interface JobDetailpublic void setJobClass(Class<? extends Job> jobClass)
Set the instance of Job that will be executed.
IllegalArgumentException - if jobClass is null or the class is not a Job.public JobDataMap getJobDataMap()
JobDetail
Get the JobDataMap that is associated with the Job.
getJobDataMap in interface JobDetailpublic void setJobDataMap(JobDataMap jobDataMap)
Set the JobDataMap to be associated with the Job.
public void setIsConcurrencyAllowed(boolean isConcurrencyAllowed)
public boolean isConcurrencyAllowed()
JobDetailisConcurrencyAllowed in interface JobDetailpublic Object clone()
public JobBuilder getJobBuilder()
JobDetailJobBuilder that is configured to produce a JobDetail identical to this one.getJobBuilder in interface JobDetailCopyright © 2011–2017 Knowm Inc.. All rights reserved.