org.quartz.ListenerManager Java Examples

The following examples show how to use org.quartz.ListenerManager. 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: Quartz2Adapter.java    From javamelody with Apache License 2.0 5 votes vote down vote up
@Override
public void removeGlobalJobListener(Class<? extends JobListener> jobListenerClass)
		throws SchedulerException {
	for (final Scheduler scheduler : JobInformations.getAllSchedulers()) {
		final ListenerManager listenerManager = scheduler.getListenerManager();
		final List<JobListener> globalJobListeners = listenerManager.getJobListeners();
		for (final JobListener jobListener : new ArrayList<JobListener>(globalJobListeners)) {
			if (jobListenerClass.isInstance(jobListener)) {
				listenerManager.removeJobListener(jobListener.getName());
			}
		}
	}
}
 
Example #2
Source File: ScheduledInvocationManagerImpl.java    From sakai with Educational Community License v2.0 5 votes vote down vote up
public void init() throws SchedulerException {
	log.info("init()");
	triggerListener = new ContextTriggerListener("ContextTriggerListener");
	ListenerManager listenerManager = schedulerFactory.getScheduler().getListenerManager();
	// Just filter on our group.
	listenerManager.addTriggerListener(triggerListener, GroupMatcher.triggerGroupEquals(GROUP_NAME));
}
 
Example #3
Source File: ScheduledInvocationManagerImpl.java    From sakai with Educational Community License v2.0 5 votes vote down vote up
public void init() throws SchedulerException {
	log.info("init()");
	triggerListener = new ContextTriggerListener("ContextTriggerListener");
	ListenerManager listenerManager = schedulerFactory.getScheduler().getListenerManager();
	// Just filter on our group.
	listenerManager.addTriggerListener(triggerListener, GroupMatcher.triggerGroupEquals(GROUP_NAME));
}
 
Example #4
Source File: ScheduleService.java    From elasticsearch-quartz with Apache License 2.0 5 votes vote down vote up
public ListenerManager getListenerManager() {
    try {
        return scheduler.getListenerManager();
    } catch (final SchedulerException e) {
        throw new QuartzSchedulerException(e);
    }
}
 
Example #5
Source File: StdScheduler.java    From lams with GNU General Public License v2.0 4 votes vote down vote up
/**
 * @see org.quartz.Scheduler#getListenerManager()
 */
public ListenerManager getListenerManager() throws SchedulerException {
    return sched.getListenerManager();
}
 
Example #6
Source File: RemoteScheduler.java    From lams with GNU General Public License v2.0 4 votes vote down vote up
public ListenerManager getListenerManager() throws SchedulerException {
    throw new SchedulerException(
        "Operation not supported for remote schedulers.");
}
 
Example #7
Source File: QuartzScheduler.java    From lams with GNU General Public License v2.0 4 votes vote down vote up
public ListenerManager getListenerManager() {
    return listenerManager;
}
 
Example #8
Source File: ScheduledInvocationManagerImpl.java    From sakai with Educational Community License v2.0 4 votes vote down vote up
public void destroy() throws SchedulerException {
	log.info("destroy()");
	ListenerManager listenerManager = schedulerFactory.getScheduler().getListenerManager();
	listenerManager.removeTriggerListener(triggerListener.getName());
}
 
Example #9
Source File: FoxbpmScheduler.java    From FoxBPM with Apache License 2.0 4 votes vote down vote up
public ListenerManager getListenerManager() throws SchedulerException {
	// TODO Auto-generated method stub
	return null;
}
 
Example #10
Source File: AbstractScheduler.java    From smarthome with Eclipse Public License 2.0 4 votes vote down vote up
@Override
public ListenerManager getListenerManager() throws SchedulerException {
    throw new UnsupportedOperationException();
}
 
Example #11
Source File: ScheduledInvocationManagerImpl.java    From sakai with Educational Community License v2.0 4 votes vote down vote up
public void destroy() throws SchedulerException {
	log.info("destroy()");
	ListenerManager listenerManager = schedulerFactory.getScheduler().getListenerManager();
	listenerManager.removeTriggerListener(triggerListener.getName());
}
 
Example #12
Source File: RemoteMBeanScheduler.java    From lams with GNU General Public License v2.0 2 votes vote down vote up
/**
 * <p>
 * Calls the equivalent method on the 'proxied' <code>QuartzScheduler</code>.
 * </p>
 */
public ListenerManager getListenerManager() throws SchedulerException {
    throw new SchedulerException(
            "Operation not supported for remote schedulers.");
}