Home » quartz-1.6.0 » org » quartz » [javadoc | source]
org.quartz
public class: JobDetail [javadoc | source]
java.lang.Object
   org.quartz.JobDetail

All Implemented Interfaces:
    Cloneable, Serializable

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:
 public JobDetail() 
 public JobDetail(String name,
    String group,
    Class jobClass) 

    Create a JobDetail with the given name, and group, and the default settings of all the other properties.

    Parameters:
    group - if null, Scheduler.DEFAULT_GROUP will be used.
    Throws:
    IllegalArgumentException - if nameis null or empty, or the group is an empty string.
    exception: IllegalArgumentException - if nameis null or empty, or the group is an empty string.
 public JobDetail(String name,
    String group,
    Class jobClass,
    boolean volatility,
    boolean durability,
    boolean recover) 

    Create a JobDetail with the given name, and group, and the given settings of all the other properties.

    Parameters:
    group - if null, Scheduler.DEFAULT_GROUP will be used.
    Throws:
    IllegalArgumentException - if nameis null or empty, or the group is an empty string.
    exception: IllegalArgumentException - if nameis null or empty, or the group is an empty string.
Method from org.quartz.JobDetail Summary:
addJobListener,   clone,   getDescription,   getFullName,   getGroup,   getJobClass,   getJobDataMap,   getJobListenerNames,   getKey,   getName,   isDurable,   isStateful,   isVolatile,   removeJobListener,   requestsRecovery,   setDescription,   setDurability,   setGroup,   setJobClass,   setJobDataMap,   setName,   setRequestsRecovery,   setVolatility,   toString,   validate
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.quartz.JobDetail Detail:
 public  void addJobListener(String name) 

    Add the specified name of a JobListener to the end of the Job's list of listeners.

 public Object clone() 
 public String getDescription() 

    Return the description given to the Job instance by its creator (if any).

 public String getFullName() 

    Returns the 'full name' of the JobDetail in the format "group.name".

 public String getGroup() 

    Get the group of this Job.

 public Class getJobClass() 

    Get the instance of Job that will be executed.

 public JobDataMap getJobDataMap() 

    Get the JobDataMap that is associated with the Job.

 public String[] getJobListenerNames() 

    Returns an array of String s containing the names of all JobListener s assigned to the Job, in the order in which they should be notified.

 public Key getKey() 
 public String getName() 

    Get the name of this Job.

 public boolean isDurable() 

    Whether or not the Job should remain stored after it is orphaned (no Trigger s point to it).

    If not explicitly set, the default value is false.

 public boolean isStateful() 

    Whether or not the Job implements the interface StatefulJob .

 public boolean isVolatile() 

    Whether or not the Job should not be persisted in the org.quartz.spi.JobStore for re-use after program restarts.

    If not explicitly set, the default value is false.

 public boolean removeJobListener(String name) 

    Remove the specified name of a JobListener from the Job's list of listeners.

 public boolean requestsRecovery() 

    Instructs the Scheduler whether or not the Job should be re-executed if a 'recovery' or 'fail-over' situation is encountered.

    If not explicitly set, the default value is false.

 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.

 public  void setDurability(boolean durability) 

    Set whether or not the Job should remain stored after it is orphaned (no Trigger s point to it).

    If not explicitly set, the default value is false.

 public  void setGroup(String group) 

    Set the group of this Job.

 public  void setJobClass(Class jobClass) 

    Set the instance of Job that will be executed.

 public  void setJobDataMap(JobDataMap jobDataMap) 

    Set the JobDataMap to be associated with the Job.

 public  void setName(String name) 

    Set the name of this Job.

 public  void setRequestsRecovery(boolean shouldRecover) 

    Set whether or not the the Scheduler should re-execute the Job if a 'recovery' or 'fail-over' situation is encountered.

    If not explicitly set, the default value is false.

 public  void setVolatility(boolean volatility) 

    Set whether or not the Job should be persisted in the org.quartz.spi.JobStore for re-use after program restarts.

    If not explicitly set, the default value is false.

 public String toString() 

    Return a simple string representation of this object.

 public  void validate() throws SchedulerException 

    Validates whether the properties of the JobDetail are valid for submission into a Scheduler.