
quartz.QuartzJobFactory Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ninja-quartz-scheduler-module Show documentation
Show all versions of ninja-quartz-scheduler-module Show documentation
This is an easily plugable module for the Ninja web framework to work with Quartz Scheduler.
The newest version!
package quartz;
import org.quartz.Job;
import org.quartz.Scheduler;
import org.quartz.spi.JobFactory;
import org.quartz.spi.TriggerFiredBundle;
import com.google.inject.Inject;
import com.google.inject.Injector;
/**
*
* @author svenkubiak
*
*/
public class QuartzJobFactory implements JobFactory {
@Inject
private Injector injector;
public Job newJob(final TriggerFiredBundle bundle, final Scheduler scheduler) {
return injector.getInstance(bundle.getJobDetail().getJobClass());
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy