The Spring Framework

org.springframework.scheduling.quartz
Class DelegatingJob

java.lang.Object
  extended by org.springframework.scheduling.quartz.DelegatingJob
All Implemented Interfaces:
Job

public class DelegatingJob
extends Object
implements Job

Simple Job adapter that delegates to a given Runnable.

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
DelegatingJob(Runnable runnable)
          Create a new DelegatingJob.
 
Method Summary
 void execute(JobExecutionContext context)
          Delegates execution to the underlying Runnable, converting any Exception thrown to a Quartz JobExecutionException (as required by the Job contract).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DelegatingJob

public DelegatingJob(Runnable runnable)
Create a new DelegatingJob.

Parameters:
runnable - the Runnable implementation to delegate to
Method Detail

execute

public void execute(JobExecutionContext context)
             throws JobExecutionException
Delegates execution to the underlying Runnable, converting any Exception thrown to a Quartz JobExecutionException (as required by the Job contract).

Specified by:
execute in interface Job
Throws:
JobExecutionException

The Spring Framework

Copyright © 2002-2006 The Spring Framework.