Top Description Fields Constructors Methods
org.springframework.scheduling.config

public Class TriggerTask

extends Task
Class Inheritance
Known Direct Subclasses
org.springframework.scheduling.config.CronTask
Imports
org.springframework.scheduling.Trigger, org.springframework.util.Assert

Task implementation defining a Runnable to be executed according to a given Trigger.
Author
Chris Beams
Since
3.2
See Also
ScheduledTaskRegistrar#addTriggerTask(TriggerTask), org.springframework.scheduling.TaskScheduler#schedule(Runnable, Trigger)

Field Summary

Modifier and TypeField and Description
private final Trigger

Constructor Summary

AccessConstructor and Description
public
TriggerTask(Runnable
the underlying task to execute
runnable
,
Trigger
specifies when the task should be executed
trigger
)

Create a new TriggerTask.

Method Summary

Modifier and TypeMethod and Description
public Trigger
getTrigger()

Return the associated trigger.

Inherited from org.springframework.scheduling.config.Task:
getRunnabletoString

Field Detail

triggerback to summary
private final Trigger trigger

Constructor Detail

TriggerTaskback to summary
public TriggerTask(Runnable runnable, Trigger trigger)

Create a new TriggerTask.

Parameters
runnable:Runnable

the underlying task to execute

trigger:Trigger

specifies when the task should be executed

Method Detail

getTriggerback to summary
public Trigger getTrigger()

Return the associated trigger.