Package org.quartz.jobs
Class JobDetailImpl
java.lang.Object
org.quartz.jobs.JobDetailImpl
- All Implemented Interfaces:
Serializable
,Cloneable
,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
.
Job
s have a name and group associated with them, which should uniquely identify
them within a single
.
Scheduler
Trigger
s are the 'mechanism' by which Job
s are scheduled. Many
Trigger
s can point to the same Job
, but a single Trigger
can only point to one Job
.
- Author:
- James House, Sharada Jambula, timmolter
- See Also:
-
Constructor Summary
ConstructorDescriptionCreate aJobDetail
with no specified name or group, and the default settings of all the other properties. -
Method Summary
Modifier and TypeMethodDescriptionclone()
boolean
Return the description given to theJob
instance by its creator (if any).Get aJobBuilder
that is configured to produce aJobDetail
identical to this one.Get the instance ofJob
that will be executed.Get theJobDataMap
that is associated with theJob
.getName()
Get the name of thisJob
.int
hashCode()
boolean
The default behavior is to veto any job is currently running concurrent.void
setDescription
(String description) Set a description for theJob
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 ofJob
that will be executed.void
setJobDataMap
(JobDataMap jobDataMap) Set theJobDataMap
to be associated with theJob
.void
Set the name of thisJob
.toString()
-
Constructor Details
-
JobDetailImpl
public JobDetailImpl()Create aJobDetail
with no specified name or group, and the default settings of all the other properties.Note that the
setName(String)
,invalid @link
#setGroup(String)
setJobClass(Class)
methods must be called before the job can be placed into aScheduler
-
-
Method Details
-
toString
-
getName
Get the name of thisJob
. -
setName
Set the name of thisJob
.- Throws:
IllegalArgumentException
- if name is null or empty.
-
getDescription
Description copied from interface:JobDetail
Return the description given to theJob
instance by its creator (if any).- Specified by:
getDescription
in interfaceJobDetail
- Returns:
- null if no description was set.
-
setDescription
Set a description for theJob
instance - may be useful for remembering/displaying the purpose of the job, though the description has no meaning to Quartz. -
getJobClass
Description copied from interface:JobDetail
Get the instance ofJob
that will be executed.- Specified by:
getJobClass
in interfaceJobDetail
-
setJobClass
Set the instance ofJob
that will be executed.- Throws:
IllegalArgumentException
- if jobClass is null or the class is not aJob
.
-
getJobDataMap
Description copied from interface:JobDetail
Get theJobDataMap
that is associated with theJob
.- Specified by:
getJobDataMap
in interfaceJobDetail
-
setJobDataMap
Set theJobDataMap
to be associated with theJob
. -
setIsConcurrencyAllowed
public void setIsConcurrencyAllowed(boolean isConcurrencyAllowed) -
isConcurrencyAllowed
public boolean isConcurrencyAllowed()Description copied from interface:JobDetail
The default behavior is to veto any job is currently running concurrent. However, concurrent jobs can be created by setting the 'Concurrency' to true- Specified by:
isConcurrencyAllowed
in interfaceJobDetail
- Returns:
-
equals
-
hashCode
public int hashCode() -
clone
-
getJobBuilder
Description copied from interface:JobDetail
Get aJobBuilder
that is configured to produce aJobDetail
identical to this one.- Specified by:
getJobBuilder
in interfaceJobDetail
-