|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.pentaho.platform.api.scheduler2.Job
public class Job
A Job
is a representation of the union between an action to be
performed, data to be supplied, and a schedule upon which the action will be fired.
The scheduling system is responsible for creating Job
s via
IScheduler.createJob(String, Class, Map, JobTrigger)
. Jobs are
likely persistent, at least for the life of a IScheduler
instance.
In other words, an IScheduler
instance should never forget about a
Job it has created, unless the Job has been removed via
IScheduler#removeJob(Job)
.
Note: once the scheduler engine processes a job run, it will create a new
IJobResult
, which will contain full historical information about job runs.
Job
will contain only minimal of such temporal information.
Nested Class Summary | |
---|---|
static class |
Job.JobState
|
Constructor Summary | |
---|---|
Job()
|
Method Summary | |
---|---|
String |
getJobId()
|
String |
getJobName()
|
Map<String,Serializable> |
getJobParams()
|
JobTrigger |
getJobTrigger()
|
Date |
getLastRun()
|
Date |
getNextRun()
|
String |
getSchedulableClass()
|
Job.JobState |
getState()
|
String |
getUserName()
|
void |
setJobId(String jobId)
Sets the id that uniquely defines this job. |
void |
setJobName(String jobName)
Sets the user defined name of this job. |
void |
setJobParams(Map<String,Serializable> jobParams)
Sets the parameters that will be passed to the scheduled IAction when the job executes. |
void |
setJobTrigger(JobTrigger jobTrigger)
Sets the trigger used to determine when this job runs. |
void |
setLastRun(Date lastRun)
Sets the last time the job executed. |
void |
setNextRun(Date nextRun)
Sets the next time the job will execute |
void |
setSchedulableClass(String schedulableClass)
Sets the name of the IAction class that will run when the job is executed. |
void |
setState(Job.JobState state)
Sets the current state of this job |
void |
setUserName(String userName)
Sets the name of the user that has scheduled this job |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Job()
Method Detail |
---|
public JobTrigger getJobTrigger()
public Map<String,Serializable> getJobParams()
public Date getLastRun()
public Date getNextRun()
public String getSchedulableClass()
public String getJobId()
public String getJobName()
public String getUserName()
public void setJobTrigger(JobTrigger jobTrigger)
jobTrigger
- the job triggerpublic void setJobParams(Map<String,Serializable> jobParams)
jobParams
- the parameters to be passed to the IActionpublic void setLastRun(Date lastRun)
lastRun
- the last time the job ran. null if the job has not run.public void setNextRun(Date nextRun)
nextRun
- the next time the job will run. null if the job will not run again.public void setSchedulableClass(String schedulableClass)
schedulableClass
- the name of the IAction to run.public void setJobId(String jobId)
jobId
- the job idpublic void setUserName(String userName)
userName
- the user namepublic void setJobName(String jobName)
jobName
- the job namepublic Job.JobState getState()
public void setState(Job.JobState state)
state
- the job state
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |