Class JobDetailImpl

java.lang.Object
org.quartz.jobs.JobDetailImpl
All Implemented Interfaces:
Serializable, Cloneable, JobDetail

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.

Author:
James House, Sharada Jambula, timmolter
See Also:
  • Constructor Details

    • JobDetailImpl

      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),

      invalid @link
      #setGroup(String)
      and setJobClass(Class)methods must be called before the job can be placed into a Scheduler
  • Method Details

    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getName

      public String getName()
      Get the name of this Job.
      Specified by:
      getName in interface JobDetail
    • setName

      public void setName(String name)
      Set the name of this Job.
      Throws:
      IllegalArgumentException - if name is null or empty.
    • getDescription

      public String getDescription()
      Description copied from interface: JobDetail
      Return the description given to the Job instance by its creator (if any).
      Specified by:
      getDescription in interface JobDetail
      Returns:
      null if no description was set.
    • setDescription

      public 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.
    • getJobClass

      public Class<? extends Job> getJobClass()
      Description copied from interface: JobDetail
      Get the instance of Job that will be executed.
      Specified by:
      getJobClass in interface JobDetail
    • setJobClass

      public void setJobClass(Class<? extends Job> jobClass)
      Set the instance of Job that will be executed.
      Throws:
      IllegalArgumentException - if jobClass is null or the class is not a Job.
    • getJobDataMap

      public JobDataMap getJobDataMap()
      Description copied from interface: JobDetail
      Get the JobDataMap that is associated with the Job.
      Specified by:
      getJobDataMap in interface JobDetail
    • setJobDataMap

      public void setJobDataMap(JobDataMap jobDataMap)
      Set the JobDataMap to be associated with the Job.
    • 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 interface JobDetail
      Returns:
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • clone

      public Object clone()
      Specified by:
      clone in interface JobDetail
      Overrides:
      clone in class Object
    • getJobBuilder

      public JobBuilder getJobBuilder()
      Description copied from interface: JobDetail
      Get a JobBuilder that is configured to produce a JobDetail identical to this one.
      Specified by:
      getJobBuilder in interface JobDetail