Spring Framework

org.springframework.scheduling.config
Class TriggerTask

java.lang.Object
  extended by org.springframework.scheduling.config.Task
      extended by org.springframework.scheduling.config.TriggerTask
Direct Known Subclasses:
CronTask

public class TriggerTask
extends Task

Task implementation defining a Runnable to be executed according to a given Trigger.

Since:
3.2
Author:
Chris Beams
See Also:
Trigger.nextExecutionTime(org.springframework.scheduling.TriggerContext), ScheduledTaskRegistrar.setTriggerTasksList(java.util.List), TaskScheduler.schedule(Runnable, Trigger)

Constructor Summary
TriggerTask(java.lang.Runnable runnable, Trigger trigger)
          Create a new TriggerTask.
 
Method Summary
 Trigger getTrigger()
           
 
Methods inherited from class org.springframework.scheduling.config.Task
getRunnable
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TriggerTask

public TriggerTask(java.lang.Runnable runnable,
                   Trigger trigger)
Create a new TriggerTask.

Parameters:
runnable - the underlying task to execute
trigger - specifies when the task should be executed
Method Detail

getTrigger

public Trigger getTrigger()

Spring Framework