Java Code Examples for org.quartz.JobListener#jobExecutionVetoed()
The following examples show how to use
org.quartz.JobListener#jobExecutionVetoed() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: QuartzScheduler.java From lams with GNU General Public License v2.0 | 6 votes |
public void notifyJobListenersWasVetoed(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.jobExecutionVetoed(jec); } catch (Exception e) { SchedulerException se = new SchedulerException( "JobListener '" + jl.getName() + "' threw exception: " + e.getMessage(), e); throw se; } } }
Example 2
Source File: QuartzScheduler.java From AsuraFramework with Apache License 2.0 | 6 votes |
public void notifyJobListenersWasVetoed(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.jobExecutionVetoed(jec); } catch (Exception e) { SchedulerException se = new SchedulerException( "JobListener '" + jl.getName() + "' threw exception: " + e.getMessage(), e); se.setErrorCode(SchedulerException.ERR_JOB_LISTENER); throw se; } } }
Example 3
Source File: BroadcastJobListener.java From lams with GNU General Public License v2.0 | 5 votes |
public void jobExecutionVetoed(JobExecutionContext context) { Iterator<JobListener> itr = listeners.iterator(); while(itr.hasNext()) { JobListener jl = itr.next(); jl.jobExecutionVetoed(context); } }
Example 4
Source File: FilterAndBroadcastJobListener.java From AsuraFramework with Apache License 2.0 | 5 votes |
public void jobExecutionVetoed(JobExecutionContext context) { if(!shouldDispatch(context)) { return; } Iterator itr = listeners.iterator(); while(itr.hasNext()) { JobListener jl = (JobListener) itr.next(); jl.jobExecutionVetoed(context); } }