Class DelegatingJob
- java.lang.Object
- org.springframework.scheduling.quartz.DelegatingJob
- All Implemented Interfaces:
Job
public class DelegatingJob extends Object implements Job
Simple QuartzJobadapter that delegates to a givenRunnableinstance.Typically used in combination with property injection on the Runnable instance, receiving parameters from the Quartz JobDataMap that way instead of via the JobExecutionContext.
- Since:
- 2.0
- Author:
- Juergen Hoeller
- See Also:
SpringBeanJobFactory,Job.execute(org.quartz.JobExecutionContext)
Constructor Summary
Constructors Constructor Description DelegatingJob(Runnable delegate)Create a new DelegatingJob.
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidexecute(JobExecutionContext context)Delegates execution to the underlying Runnable.RunnablegetDelegate()Return the wrapped Runnable implementation.
Constructor Detail
DelegatingJob
public DelegatingJob(Runnable delegate)
Create a new DelegatingJob.- Parameters:
delegate- the Runnable implementation to delegate to
Method Detail
getDelegate
public final Runnable getDelegate()
Return the wrapped Runnable implementation.
execute
public void execute(JobExecutionContext context) throws JobExecutionException
Delegates execution to the underlying Runnable.- Specified by:
executein interfaceJob- Throws:
JobExecutionException