Package org.silverpeas.core.scheduler
Class JobExecutionContext
- java.lang.Object
-
- org.silverpeas.core.scheduler.JobExecutionContext
-
public class JobExecutionContext extends Object
The context of a job execution. A such object embeds information about the execution context of a job such as some execution parameters or the trigger from which the execution was fired.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static JobExecutionContext
createWith(String jobName, Date fireTime)
Creates a new context for the execution of the specified job and fired at the specified time.Date
getFireTime()
Gets the actual time at which the trigger fired.String
getJobName()
Gets the name of the job that takes part in the job execution .JobExecutionContext
jobFiredAt(Date date)
Sets the actual time at which the trigger fired.JobExecutionContext
jobNamed(String theJobName)
Sets the name of the job that takes part in the job execution.
-
-
-
Method Detail
-
createWith
public static JobExecutionContext createWith(String jobName, Date fireTime)
Creates a new context for the execution of the specified job and fired at the specified time.- Parameters:
jobName
- the name of the job that is being executed.fireTime
- the time at which the job has been starting.- Returns:
- the execution context of the job.
-
getFireTime
public Date getFireTime()
Gets the actual time at which the trigger fired.- Returns:
- the triggering time.
-
jobFiredAt
public JobExecutionContext jobFiredAt(Date date)
Sets the actual time at which the trigger fired.- Parameters:
date
- the triggering time.- Returns:
- itself.
-
getJobName
public String getJobName()
Gets the name of the job that takes part in the job execution .- Returns:
- the name of the executed job.
-
jobNamed
public JobExecutionContext jobNamed(String theJobName)
Sets the name of the job that takes part in the job execution.- Parameters:
theJobName
- the name of the executed job.- Returns:
- itself.
-
-