com.silverpeas.scheduler
Class JobExecutionContext

java.lang.Object
  extended by com.silverpeas.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
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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.


Copyright © 2016 Silverpeas. All Rights Reserved.