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

public Class DelegatingJob

extends Object
implements org.quartz.Job
Class Inheritance
Imports
org.quartz.Job, org.quartz.JobExecutionContext, org.quartz.JobExecutionException, org.springframework.util.Assert

Simple Quartz org.quartz.Job adapter that delegates to a given java.lang.Runnable instance.

Typically used in combination with property injection on the Runnable instance, receiving parameters from the Quartz JobDataMap that way instead of via the JobExecutionContext.

Author
Juergen Hoeller
Since
2.0
See Also
SpringBeanJobFactory, org.quartz.Job#execute(org.quartz.JobExecutionContext)

Field Summary

Modifier and TypeField and Description
private final Runnable

Constructor Summary

AccessConstructor and Description
public
DelegatingJob(Runnable
the Runnable implementation to delegate to
delegate
)

Create a new DelegatingJob.

Method Summary

Modifier and TypeMethod and Description
public void
execute(org.quartz.JobExecutionContext context)

Delegates execution to the underlying Runnable.

public final Runnable
getDelegate()

Return the wrapped Runnable implementation.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

delegateback to summary
private final Runnable delegate

Constructor Detail

DelegatingJobback to summary
public DelegatingJob(Runnable delegate)

Create a new DelegatingJob.

Parameters
delegate:Runnable

the Runnable implementation to delegate to

Method Detail

executeback to summary
public void execute(org.quartz.JobExecutionContext context) throws org.quartz.JobExecutionException

Delegates execution to the underlying Runnable.

Annotations
@Override
getDelegateback to summary
public final Runnable getDelegate()

Return the wrapped Runnable implementation.