org.springframework.scheduling.quartz
Class DelegatingJob
java.lang.Object
org.springframework.scheduling.quartz.DelegatingJob
public class DelegatingJob
- extends java.lang.Object
Simple Quartz org.quartz.Job
adapter that delegates to a
given 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.
- Since:
- 2.0
- Author:
- Juergen Hoeller
- See Also:
SpringBeanJobFactory
,
org.quartz.Job#execute(org.quartz.JobExecutionContext)
Field Summary |
private java.lang.Runnable |
delegate
|
Constructor Summary |
DelegatingJob(java.lang.Runnable delegate)
Create a new DelegatingJob. |
Method Summary |
void |
execute(JobExecutionContext context)
Delegates execution to the underlying Runnable. |
java.lang.Runnable |
getDelegate()
Return the wrapped Runnable implementation. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
delegate
private final java.lang.Runnable delegate
DelegatingJob
public DelegatingJob(java.lang.Runnable delegate)
- Create a new DelegatingJob.
- Parameters:
delegate
- the Runnable implementation to delegate to
getDelegate
public final java.lang.Runnable getDelegate()
- Return the wrapped Runnable implementation.
execute
public void execute(JobExecutionContext context)
throws JobExecutionException
- Delegates execution to the underlying Runnable.
- Throws:
JobExecutionException