本文整理汇总了Java中org.quartz.JobListener.jobToBeExecuted方法的典型用法代码示例。如果您正苦于以下问题:Java JobListener.jobToBeExecuted方法的具体用法?Java JobListener.jobToBeExecuted怎么用?Java JobListener.jobToBeExecuted使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.quartz.JobListener
的用法示例。
在下文中一共展示了JobListener.jobToBeExecuted方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: notifyJobListenersToBeExecuted
import org.quartz.JobListener; //导入方法依赖的package包/类
public void notifyJobListenersToBeExecuted(JobExecutionContext jec)
throws SchedulerException {
// build a list of all job listeners that are to be notified...
List<JobListener> jobListeners = buildJobListenerList();
// notify all job listeners
for(JobListener jl: jobListeners) {
try {
if(!matchJobListener(jl, jec.getJobDetail().getKey()))
continue;
jl.jobToBeExecuted(jec);
} catch (Exception e) {
SchedulerException se = new SchedulerException(
"JobListener '" + jl.getName() + "' threw exception: "
+ e.getMessage(), e);
throw se;
}
}
}
示例2: notifyJobListenersToBeExecuted
import org.quartz.JobListener; //导入方法依赖的package包/类
public void notifyJobListenersToBeExecuted(JobExecutionContext jec)
throws SchedulerException {
// build a list of all job listeners that are to be notified...
List jobListeners = buildJobListenerList(jec.getJobDetail()
.getJobListenerNames());
// notify all job listeners
java.util.Iterator itr = jobListeners.iterator();
while (itr.hasNext()) {
JobListener jl = (JobListener) itr.next();
try {
jl.jobToBeExecuted(jec);
} catch (Exception e) {
SchedulerException se = new SchedulerException(
"JobListener '" + jl.getName() + "' threw exception: "
+ e.getMessage(), e);
se.setErrorCode(SchedulerException.ERR_JOB_LISTENER);
throw se;
}
}
}
示例3: jobToBeExecuted
import org.quartz.JobListener; //导入方法依赖的package包/类
public void jobToBeExecuted(JobExecutionContext context) {
Iterator<JobListener> itr = listeners.iterator();
while(itr.hasNext()) {
JobListener jl = itr.next();
jl.jobToBeExecuted(context);
}
}
示例4: jobToBeExecuted
import org.quartz.JobListener; //导入方法依赖的package包/类
public void jobToBeExecuted(JobExecutionContext context) {
if(!shouldDispatch(context)) {
return;
}
Iterator itr = listeners.iterator();
while(itr.hasNext()) {
JobListener jl = (JobListener) itr.next();
jl.jobToBeExecuted(context);
}
}