Class SimpleTriggerContext
- java.lang.Object
- org.springframework.scheduling.support.SimpleTriggerContext
- All Implemented Interfaces:
TriggerContext
public class SimpleTriggerContext extends Object implements TriggerContext
Simple data holder implementation of theTriggerContextinterface.- Since:
- 3.0
- Author:
- Juergen Hoeller
Constructor Summary
Constructors Constructor Description SimpleTriggerContext()Create a SimpleTriggerContext with all time values set tonull.SimpleTriggerContext(Date lastScheduledExecutionTime, Date lastActualExecutionTime, Date lastCompletionTime)Create a SimpleTriggerContext with the given time values.
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DatelastActualExecutionTime()Return the last actual execution time of the task, ornullif not scheduled before.DatelastCompletionTime()Return the last completion time of the task, ornullif not scheduled before.DatelastScheduledExecutionTime()Return the last scheduled execution time of the task, ornullif not scheduled before.voidupdate(Date lastScheduledExecutionTime, Date lastActualExecutionTime, Date lastCompletionTime)Update this holder's state with the latest time values.
Constructor Detail
SimpleTriggerContext
public SimpleTriggerContext()
Create a SimpleTriggerContext with all time values set tonull.
SimpleTriggerContext
public SimpleTriggerContext(Date lastScheduledExecutionTime, Date lastActualExecutionTime, Date lastCompletionTime)
Create a SimpleTriggerContext with the given time values.- Parameters:
lastScheduledExecutionTime- last scheduled execution timelastActualExecutionTime- last actual execution timelastCompletionTime- last completion time
Method Detail
update
public void update(Date lastScheduledExecutionTime, Date lastActualExecutionTime, Date lastCompletionTime)
Update this holder's state with the latest time values.- Parameters:
lastScheduledExecutionTime- last scheduled execution timelastActualExecutionTime- last actual execution timelastCompletionTime- last completion time
lastScheduledExecutionTime
public Date lastScheduledExecutionTime()
Description copied from interface:TriggerContextReturn the last scheduled execution time of the task, ornullif not scheduled before.- Specified by:
lastScheduledExecutionTimein interfaceTriggerContext
lastActualExecutionTime
public Date lastActualExecutionTime()
Description copied from interface:TriggerContextReturn the last actual execution time of the task, ornullif not scheduled before.- Specified by:
lastActualExecutionTimein interfaceTriggerContext
lastCompletionTime
public Date lastCompletionTime()
Description copied from interface:TriggerContextReturn the last completion time of the task, ornullif not scheduled before.- Specified by:
lastCompletionTimein interfaceTriggerContext