Quartz_2.2.X学习系列十二:Tutorials - Lesson 12: Miscellaneous Features of Quartz

Lesson 12: Miscellaneous Features of Quartz

Plug-Ins

Quartz provides an interface (org.quartz.spi.SchedulerPlugin) for plugging-in additional functionality.

Plugins that ship with Quartz to provide various utility capabilities can be found documented in the org.quartz.plugins package. They provide functionality such as auto-scheduling of jobs upon scheduler startup, logging a history of job and trigger events, and ensuring that the scheduler shuts down cleanly when the JVM exits.

 

Quartz提供了一个接口(org.quartz.spi.SchedulerPlugin),用于插入附加功能。

用Quartz来提供各种实用功能的插件可以在org.quartz.plugins包中找到。它们提供了一些功能,比如在调度器启动时自动调度作业,记录作业的历史和触发事件,并确保当JVM退出时调度程序会清理后才关闭。

 

JobFactory

When a trigger fires, the Job it is associated to is instantiated via the JobFactory configured on the Scheduler. The default JobFactory simply calls newInstance() on the job class. You may want to create your own implementation of JobFactory to accomplish things such as having your application’s IoC or DI container produce/initialize the job instance.

 

扫描二维码关注公众号,回复: 3107221 查看本文章

当触发器触发时,它所关联的作业将通过在调度程序上配置的JobFactory实例化。默认的JobFactory简单地在作业类上调用newInstance()。您可能想要创建自己的JobFactory实现来完成一些事情,比如让应用程序的IoC或DI容器生产/初始化作业实例。

 

See the org.quartz.spi.JobFactory interface, and the associated Scheduler.setJobFactory(fact) method.

‘Factory-Shipped’ Jobs

 

Quartz also provides a number of utility Jobs that you can use in your application for doing things like sending e-mails and invoking EJBs. These out-of-the-box Jobs can be found documented in the org.quartz.jobs package.

 

Quartz还提供了许多实用的Job,您可以在应用程序中使用这些作业,比如发送电子邮件和调用EJBs。这些开箱即用的工作可以在org.quartz.jobs 包中找到。

 

Pasted from <http://www.quartz-scheduler.org/documentation/quartz-2.2.x/tutorials/tutorial-lesson-12.html>

猜你喜欢

转载自blog.csdn.net/arnolian/article/details/82556523