本文整理了Java中org.quartz.Scheduler.addGlobalJobListener()
方法的一些代码示例,展示了Scheduler.addGlobalJobListener()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Scheduler.addGlobalJobListener()
方法的具体详情如下:
包路径:org.quartz.Scheduler
类名称:Scheduler
方法名:addGlobalJobListener
[英]Add the given JobListener
to the Scheduler
's global list.
Listeners in the 'global' list receive notification of execution events for ALL org.quartz.JobDetail
s.
[中]将给定的JobListener
添加到Scheduler
的全局列表中。
“全局”列表中的侦听器接收所有org.quartz.JobDetail
的执行事件通知。
代码示例来源:origin: javamelody/javamelody
public void addGlobalJobListener(JobListener jobGlobalListener) throws SchedulerException {
final Scheduler defaultScheduler;
if (Parameter.QUARTZ_DEFAULT_LISTENER_DISABLED.getValueAsBoolean()) {
defaultScheduler = null;
LOG.debug("Initialization of Quartz default listener has been disabled");
} else {
defaultScheduler = StdSchedulerFactory.getDefaultScheduler();
defaultScheduler.addGlobalJobListener(jobGlobalListener);
}
for (final Scheduler scheduler : JobInformations.getAllSchedulers()) {
if (scheduler != defaultScheduler) {
scheduler.addGlobalJobListener(jobGlobalListener);
}
}
}
代码示例来源:origin: org.rhq/rhq-enterprise-server
public void addGlobalJobListener(JobListener jobListener) throws SchedulerException {
scheduler.addGlobalJobListener(jobListener);
}
代码示例来源:origin: org.rhq/rhq-enterprise-server
public void addGlobalJobListener(JobListener jobListener) throws SchedulerException {
this.scheduler.addGlobalJobListener(jobListener);
}
代码示例来源:origin: com.opensymphony.quartz/com.springsource.org.quartz
/**
* <p>
* Called during creation of the <code>Scheduler</code> in order to give
* the <code>SchedulerPlugin</code> a chance to initialize.
* </p>
*
* @throws SchedulerConfigException
* if there is an error initializing.
*/
public void initialize(String name, Scheduler scheduler)
throws SchedulerException {
this.name = name;
scheduler.addGlobalJobListener(this);
}
代码示例来源:origin: quartz/quartz-all
/**
* <p>
* Called during creation of the <code>Scheduler</code> in order to give
* the <code>SchedulerPlugin</code> a chance to initialize.
* </p>
*
* @throws SchedulerConfigException
* if there is an error initializing.
*/
public void initialize(String name, Scheduler scheduler)
throws SchedulerException {
this.name = name;
scheduler.addGlobalJobListener(this);
}
代码示例来源:origin: net.bull.javamelody/javamelody-core
public void addGlobalJobListener(JobListener jobGlobalListener) throws SchedulerException {
final Scheduler defaultScheduler;
if (Parameter.QUARTZ_DEFAULT_LISTENER_DISABLED.getValueAsBoolean()) {
defaultScheduler = null;
LOG.debug("Initialization of Quartz default listener has been disabled");
} else {
defaultScheduler = StdSchedulerFactory.getDefaultScheduler();
defaultScheduler.addGlobalJobListener(jobGlobalListener);
}
for (final Scheduler scheduler : JobInformations.getAllSchedulers()) {
if (scheduler != defaultScheduler) {
scheduler.addGlobalJobListener(jobGlobalListener);
}
}
}
代码示例来源:origin: org.kuali.kfs/kfs-core
/**
* @see org.kuali.kfs.sys.batch.service.SchedulerService#initialize()
*/
public void initialize() {
LOG.info("Initializing the schedule");
jobListener.setSchedulerService(this);
try {
scheduler.addGlobalJobListener(jobListener);
} catch (SchedulerException e) {
throw new RuntimeException("SchedulerServiceImpl encountered an exception when trying to register the global job listener", e);
}
for (ModuleService moduleService : kualiModuleService.getInstalledModuleServices()) {
initializeJobsForModule(moduleService);
initializeTriggersForModule(moduleService);
}
}
/**
代码示例来源:origin: org.appspy.admin/org.appspy.admin.service.impl
public void afterPropertiesSet() throws Exception
mScheduler.addGlobalJobListener(new JobListener(){
代码示例来源:origin: org.apache.kalumet/org.apache.kalumet.agent
scheduler.addGlobalJobListener( new SchedulerJobListener() );
LOGGER.debug( "Scheduler job listener plugged" );
scheduler.start();
代码示例来源:origin: com.xpn.xwiki.platform.plugins/xwiki-plugin-scheduler
/**
* Associates the scheduler with a StatusListener
*
* @throws SchedulerPluginException if the status listener failed to be set properly
*/
private void setStatusListener() throws SchedulerPluginException
{
StatusListener listener = new StatusListener();
try {
getScheduler().addSchedulerListener(listener);
getScheduler().addGlobalJobListener(listener);
} catch (SchedulerException e) {
throw new SchedulerPluginException(
SchedulerPluginException.ERROR_SCHEDULERPLUGIN_INITIALIZE_STATUS_LISTENER,
"Error while initializing the status listener", e);
}
}
内容来源于网络,如有侵权,请联系作者删除!