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

public Class Task

extends Object
Class Inheritance
Known Direct Subclasses
org.springframework.scheduling.config.TriggerTask, org.springframework.scheduling.config.DelayedTask
Imports
org.springframework.util.Assert

Holder class defining a Runnable to be executed as a task, typically at a scheduled time or interval. See subclass hierarchy for various scheduling approaches.
Authors
Chris Beams, Juergen Hoeller
Since
3.2

Field Summary

Modifier and TypeField and Description
private final Runnable

Constructor Summary

AccessConstructor and Description
public
Task(Runnable
the underlying task to execute
runnable
)

Create a new Task.

Method Summary

Modifier and TypeMethod and Description
public Runnable
getRunnable()

Return the underlying task.

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

runnableback to summary
private final Runnable runnable

Constructor Detail

Taskback to summary
public Task(Runnable runnable)

Create a new Task.

Parameters
runnable:Runnable

the underlying task to execute

Method Detail

getRunnableback to summary
public Runnable getRunnable()

Return the underlying task.

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Returns:String

a string representation of the object

Annotations
@Override