org.quartz.SchedulerListener Java Examples

The following examples show how to use org.quartz.SchedulerListener. 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 AsuraFramework with Apache License 2.0 6 votes vote down vote up
public void notifySchedulerListenersSchduled(Trigger trigger) {
    // build a list of all scheduler listeners that are to be notified...
    List schedListeners = getSchedulerListeners();

    // notify all scheduler listeners
    java.util.Iterator itr = schedListeners.iterator();
    while (itr.hasNext()) {
        SchedulerListener sl = (SchedulerListener) itr.next();
        try {
            sl.jobScheduled(trigger);
        } catch (Exception e) {
            getLog().error(
                    "Error while notifying SchedulerListener of scheduled job."
                            + "  Triger=" + trigger.getFullName(), e);
        }
    }
}
 
Example #2
Source File: QuartzScheduler.java    From AsuraFramework with Apache License 2.0 6 votes vote down vote up
public void notifySchedulerListenersJobDeleted(String jobName, String groupName) {
    // build a list of all job listeners that are to be notified...
    List schedListeners = getSchedulerListeners();

    // notify all scheduler listeners
    java.util.Iterator itr = schedListeners.iterator();
    while (itr.hasNext()) {
        SchedulerListener sl = (SchedulerListener) itr.next();
        try {
            sl.jobDeleted(jobName, groupName);
        } catch (Exception e) {
            getLog().error(
                    "Error while notifying SchedulerListener of JobAdded.",
                    e);
        }
    }
}
 
Example #3
Source File: QuartzScheduler.java    From AsuraFramework with Apache License 2.0 6 votes vote down vote up
public void notifySchedulerListenersPausedJob(String name, String group) {
    // build a list of all job listeners that are to be notified...
    List schedListeners = getSchedulerListeners();

    // notify all scheduler listeners
    java.util.Iterator itr = schedListeners.iterator();
    while (itr.hasNext()) {
        SchedulerListener sl = (SchedulerListener) itr.next();
        try {
            sl.jobsPaused(name, group);
        } catch (Exception e) {
            getLog().error(
                    "Error while notifying SchedulerListener of paused job/group."
                            + "  Job=" + group + "." + name, e);
        }
    }
}
 
Example #4
Source File: QuartzScheduler.java    From AsuraFramework with Apache License 2.0 6 votes vote down vote up
public void notifySchedulerListenersFinalized(Trigger trigger) {
    // build a list of all scheduler listeners that are to be notified...
    List schedListeners = getSchedulerListeners();

    // notify all scheduler listeners
    java.util.Iterator itr = schedListeners.iterator();
    while (itr.hasNext()) {
        SchedulerListener sl = (SchedulerListener) itr.next();
        try {
            sl.triggerFinalized(trigger);
        } catch (Exception e) {
            getLog().error(
                    "Error while notifying SchedulerListener of finalized trigger."
                            + "  Triger=" + trigger.getFullName(), e);
        }
    }
}
 
Example #5
Source File: QuartzScheduler.java    From AsuraFramework with Apache License 2.0 6 votes vote down vote up
public void notifySchedulerListenersResumedJob(String name, String group) {
    // build a list of all job listeners that are to be notified...
    List schedListeners = getSchedulerListeners();

    // notify all scheduler listeners
    java.util.Iterator itr = schedListeners.iterator();
    while (itr.hasNext()) {
        SchedulerListener sl = (SchedulerListener) itr.next();
        try {
            sl.jobsResumed(name, group);
        } catch (Exception e) {
            getLog().error(
                    "Error while notifying SchedulerListener of resumed job/group."
                            + "  Job=" + group + "." + name, e);
        }
    }
}
 
Example #6
Source File: QuartzScheduler.java    From AsuraFramework with Apache License 2.0 6 votes vote down vote up
public void notifySchedulerListenersResumedTrigger(String name, String group) {
    // build a list of all job listeners that are to be notified...
    List schedListeners = getSchedulerListeners();

    // notify all scheduler listeners
    java.util.Iterator itr = schedListeners.iterator();
    while (itr.hasNext()) {
        SchedulerListener sl = (SchedulerListener) itr.next();
        try {
            sl.triggersResumed(name, group);
        } catch (Exception e) {
            getLog().error(
                    "Error while notifying SchedulerListener of resumed trigger/group."
                            + "  Triger=" + group + "." + name, e);
        }
    }
}
 
Example #7
Source File: QuartzScheduler.java    From lams with GNU General Public License v2.0 6 votes vote down vote up
public void notifySchedulerListenersError(String msg, SchedulerException se) {
    // build a list of all scheduler listeners that are to be notified...
    List<SchedulerListener> schedListeners = buildSchedulerListenerList();

    // notify all scheduler listeners
    for(SchedulerListener sl: schedListeners) {
        try {
            sl.schedulerError(msg, se);
        } catch (Exception e) {
            getLog()
                    .error(
                            "Error while notifying SchedulerListener of error: ",
                            e);
            getLog().error(
                    "  Original error (for notification) was: " + msg, se);
        }
    }
}
 
Example #8
Source File: QuartzScheduler.java    From AsuraFramework with Apache License 2.0 6 votes vote down vote up
public void notifySchedulerListenersInStandbyMode() {
    // build a list of all job listeners that are to be notified...
    List schedListeners = getSchedulerListeners();

    // notify all scheduler listeners
    java.util.Iterator itr = schedListeners.iterator();
    while (itr.hasNext()) {
        SchedulerListener sl = (SchedulerListener) itr.next();
        try {
            sl.schedulerInStandbyMode();
        } catch (Exception e) {
            getLog().error(
                    "Error while notifying SchedulerListener of inStandByMode.",
                    e);
        }
    }
}
 
Example #9
Source File: QuartzScheduler.java    From lams with GNU General Public License v2.0 6 votes vote down vote up
public void notifySchedulerListenersUnscheduled(TriggerKey triggerKey) {
    // build a list of all scheduler listeners that are to be notified...
    List<SchedulerListener> schedListeners = buildSchedulerListenerList();

    // notify all scheduler listeners
    for(SchedulerListener sl: schedListeners) {
        try {
            if(triggerKey == null)
                sl.schedulingDataCleared();
            else
                sl.jobUnscheduled(triggerKey);
        } catch (Exception e) {
            getLog().error(
                    "Error while notifying SchedulerListener of unscheduled job."
                            + "  Triger=" + (triggerKey == null ? "ALL DATA" : triggerKey), e);
        }
    }
}
 
Example #10
Source File: QuartzScheduler.java    From AsuraFramework with Apache License 2.0 6 votes vote down vote up
public void notifySchedulerListenersShutdown() {
    // build a list of all job listeners that are to be notified...
    List schedListeners = getSchedulerListeners();

    // notify all scheduler listeners
    java.util.Iterator itr = schedListeners.iterator();
    while (itr.hasNext()) {
        SchedulerListener sl = (SchedulerListener) itr.next();
        try {
            sl.schedulerShutdown();
        } catch (Exception e) {
            getLog().error(
                    "Error while notifying SchedulerListener of shutdown.",
                    e);
        }
    }
}
 
Example #11
Source File: QuartzScheduler.java    From AsuraFramework with Apache License 2.0 6 votes vote down vote up
public void notifySchedulerListenersUnscheduled(String triggerName,
        String triggerGroup) {
    // build a list of all scheduler listeners that are to be notified...
    List schedListeners = getSchedulerListeners();

    // notify all scheduler listeners
    java.util.Iterator itr = schedListeners.iterator();
    while (itr.hasNext()) {
        SchedulerListener sl = (SchedulerListener) itr.next();
        try {
            sl.jobUnscheduled(triggerName, triggerGroup);
        } catch (Exception e) {
            getLog().error(
                    "Error while notifying SchedulerListener of unscheduled job."
                            + "  Triger=" + triggerGroup + "."
                            + triggerName, e);
        }
    }
}
 
Example #12
Source File: QuartzScheduler.java    From AsuraFramework with Apache License 2.0 6 votes vote down vote up
public void notifySchedulerListenersJobAdded(JobDetail jobDetail) {
    // build a list of all job listeners that are to be notified...
    List schedListeners = getSchedulerListeners();

    // notify all scheduler listeners
    java.util.Iterator itr = schedListeners.iterator();
    while (itr.hasNext()) {
        SchedulerListener sl = (SchedulerListener) itr.next();
        try {
            sl.jobAdded(jobDetail);
        } catch (Exception e) {
            getLog().error(
                    "Error while notifying SchedulerListener of JobAdded.",
                    e);
        }
    }
}
 
Example #13
Source File: QuartzScheduler.java    From AsuraFramework with Apache License 2.0 6 votes vote down vote up
public void notifySchedulerListenersStarted() {
    // build a list of all job listeners that are to be notified...
    List schedListeners = getSchedulerListeners();

    // notify all scheduler listeners
    java.util.Iterator itr = schedListeners.iterator();
    while (itr.hasNext()) {
        SchedulerListener sl = (SchedulerListener) itr.next();
        try {
            sl.schedulerStarted();
        } catch (Exception e) {
            getLog().error(
                    "Error while notifying SchedulerListener of startup.",
                    e);
        }
    }
}
 
Example #14
Source File: BroadcastSchedulerListener.java    From AsuraFramework with Apache License 2.0 5 votes vote down vote up
public void schedulerStarted() {
    Iterator itr = listeners.iterator();
    while(itr.hasNext()) {
        SchedulerListener l = (SchedulerListener) itr.next();
        l.schedulerStarted();
    }
}
 
Example #15
Source File: BroadcastSchedulerListener.java    From AsuraFramework with Apache License 2.0 5 votes vote down vote up
public void schedulerError(String msg, SchedulerException cause) {
    Iterator itr = listeners.iterator();
    while(itr.hasNext()) {
        SchedulerListener l = (SchedulerListener) itr.next();
        l.schedulerError(msg, cause);
    }
}
 
Example #16
Source File: RemoteScheduler.java    From AsuraFramework with Apache License 2.0 5 votes vote down vote up
/**
 * <p>
 * Calls the equivalent method on the 'proxied' <code>QuartzScheduler</code>.
 * </p>
 */
public void addSchedulerListener(SchedulerListener schedulerListener)
    throws SchedulerException {
    throw new SchedulerException(
            "Operation not supported for remote schedulers.",
            SchedulerException.ERR_UNSUPPORTED_FUNCTION_IN_THIS_CONFIGURATION);
}
 
Example #17
Source File: RemoteMBeanScheduler.java    From AsuraFramework with Apache License 2.0 5 votes vote down vote up
/**
 * <p>
 * Calls the equivalent method on the 'proxied' <code>QuartzScheduler</code>.
 * </p>
 */
public boolean removeSchedulerListener(SchedulerListener schedulerListener)
    throws SchedulerException {
    throw new SchedulerException(
            "Operation not supported for remote schedulers.",
            SchedulerException.ERR_UNSUPPORTED_FUNCTION_IN_THIS_CONFIGURATION);
}
 
Example #18
Source File: RemoteMBeanScheduler.java    From AsuraFramework with Apache License 2.0 5 votes vote down vote up
/**
 * <p>
 * Calls the equivalent method on the 'proxied' <code>QuartzScheduler</code>.
 * </p>
 */
public void addSchedulerListener(SchedulerListener schedulerListener)
    throws SchedulerException {
    throw new SchedulerException(
            "Operation not supported for remote schedulers.",
            SchedulerException.ERR_UNSUPPORTED_FUNCTION_IN_THIS_CONFIGURATION);
}
 
Example #19
Source File: QuartzScheduler.java    From lams with GNU General Public License v2.0 5 votes vote down vote up
public void notifySchedulerListenersJobDeleted(JobKey jobKey) {
    // build a list of all scheduler listeners that are to be notified...
    List<SchedulerListener> schedListeners = buildSchedulerListenerList();

    // notify all scheduler listeners
    for(SchedulerListener sl: schedListeners) {
        try {
            sl.jobDeleted(jobKey);
        } catch (Exception e) {
            getLog().error(
                    "Error while notifying SchedulerListener of JobAdded.",
                    e);
        }
    }
}
 
Example #20
Source File: QuartzScheduler.java    From lams with GNU General Public License v2.0 5 votes vote down vote up
public void notifySchedulerListenersShuttingdown() {
    // build a list of all scheduler listeners that are to be notified...
    List<SchedulerListener> schedListeners = buildSchedulerListenerList();

    // notify all scheduler listeners
    for(SchedulerListener sl: schedListeners) {
        try {
            sl.schedulerShuttingdown();
        } catch (Exception e) {
            getLog().error(
                    "Error while notifying SchedulerListener of shutdown.",
                    e);
        }
    }
}
 
Example #21
Source File: QuartzScheduler.java    From lams with GNU General Public License v2.0 5 votes vote down vote up
public void notifySchedulerListenersShutdown() {
    // build a list of all scheduler listeners that are to be notified...
    List<SchedulerListener> schedListeners = buildSchedulerListenerList();

    // notify all scheduler listeners
    for(SchedulerListener sl: schedListeners) {
        try {
            sl.schedulerShutdown();
        } catch (Exception e) {
            getLog().error(
                    "Error while notifying SchedulerListener of shutdown.",
                    e);
        }
    }
}
 
Example #22
Source File: QuartzScheduler.java    From lams with GNU General Public License v2.0 5 votes vote down vote up
public void notifySchedulerListenersStarting() {
    // build a list of all scheduler listeners that are to be notified...
    List<SchedulerListener> schedListeners = buildSchedulerListenerList();

    // notify all scheduler listeners
    for (SchedulerListener sl : schedListeners) {
        try {
            sl.schedulerStarting();
        } catch (Exception e) {
            getLog().error(
                    "Error while notifying SchedulerListener of startup.",
                    e);
        }
    }
}
 
Example #23
Source File: QuartzScheduler.java    From lams with GNU General Public License v2.0 5 votes vote down vote up
public void notifySchedulerListenersStarted() {
    // build a list of all scheduler listeners that are to be notified...
    List<SchedulerListener> schedListeners = buildSchedulerListenerList();

    // notify all scheduler listeners
    for(SchedulerListener sl: schedListeners) {
        try {
            sl.schedulerStarted();
        } catch (Exception e) {
            getLog().error(
                    "Error while notifying SchedulerListener of startup.",
                    e);
        }
    }
}
 
Example #24
Source File: QuartzScheduler.java    From lams with GNU General Public License v2.0 5 votes vote down vote up
public void notifySchedulerListenersInStandbyMode() {
    // build a list of all scheduler listeners that are to be notified...
    List<SchedulerListener> schedListeners = buildSchedulerListenerList();

    // notify all scheduler listeners
    for(SchedulerListener sl: schedListeners) {
        try {
            sl.schedulerInStandbyMode();
        } catch (Exception e) {
            getLog().error(
                    "Error while notifying SchedulerListener of inStandByMode.",
                    e);
        }
    }
}
 
Example #25
Source File: QuartzScheduler.java    From lams with GNU General Public License v2.0 5 votes vote down vote up
public void notifySchedulerListenersResumedJobs(String group) {
    // build a list of all scheduler listeners that are to be notified...
    List<SchedulerListener> schedListeners = buildSchedulerListenerList();

    // notify all scheduler listeners
    for(SchedulerListener sl: schedListeners) {
        try {
            sl.jobsResumed(group);
        } catch (Exception e) {
            getLog().error(
                    "Error while notifying SchedulerListener of resumed job group: "
                            + group, e);
        }
    }
}
 
Example #26
Source File: QuartzScheduler.java    From lams with GNU General Public License v2.0 5 votes vote down vote up
public void notifySchedulerListenersResumedJob(JobKey key) {
    // build a list of all scheduler listeners that are to be notified...
    List<SchedulerListener> schedListeners = buildSchedulerListenerList();

    // notify all scheduler listeners
    for(SchedulerListener sl: schedListeners) {
        try {
            sl.jobResumed(key);
        } catch (Exception e) {
            getLog().error(
                    "Error while notifying SchedulerListener of resumed job: "
                            + key, e);
        }
    }
}
 
Example #27
Source File: QuartzScheduler.java    From lams with GNU General Public License v2.0 5 votes vote down vote up
public void notifySchedulerListenersPausedJobs(String group) {
    // build a list of all scheduler listeners that are to be notified...
    List<SchedulerListener> schedListeners = buildSchedulerListenerList();

    // notify all scheduler listeners
    for(SchedulerListener sl: schedListeners) {
        try {
            sl.jobsPaused(group);
        } catch (Exception e) {
            getLog().error(
                    "Error while notifying SchedulerListener of paused job group: "
                            + group, e);
        }
    }
}
 
Example #28
Source File: QuartzScheduler.java    From lams with GNU General Public License v2.0 5 votes vote down vote up
public void notifySchedulerListenersPausedJob(JobKey key) {
    // build a list of all scheduler listeners that are to be notified...
    List<SchedulerListener> schedListeners = buildSchedulerListenerList();

    // notify all scheduler listeners
    for(SchedulerListener sl: schedListeners) {
        try {
            sl.jobPaused(key);
        } catch (Exception e) {
            getLog().error(
                    "Error while notifying SchedulerListener of paused job: "
                            + key, e);
        }
    }
}
 
Example #29
Source File: QuartzScheduler.java    From lams with GNU General Public License v2.0 5 votes vote down vote up
public void notifySchedulerListenersResumedTriggers(String group) {
    // build a list of all scheduler listeners that are to be notified...
    List<SchedulerListener> schedListeners = buildSchedulerListenerList();

    // notify all scheduler listeners
    for(SchedulerListener sl: schedListeners) {
        try {
            sl.triggersResumed(group);
        } catch (Exception e) {
            getLog().error(
                    "Error while notifying SchedulerListener of resumed group: "
                            + group, e);
        }
    }
}
 
Example #30
Source File: RemoteScheduler.java    From AsuraFramework with Apache License 2.0 5 votes vote down vote up
/**
 * <p>
 * Calls the equivalent method on the 'proxied' <code>QuartzScheduler</code>.
 * </p>
 */
public boolean removeSchedulerListener(SchedulerListener schedulerListener)
    throws SchedulerException {
    throw new SchedulerException(
            "Operation not supported for remote schedulers.",
            SchedulerException.ERR_UNSUPPORTED_FUNCTION_IN_THIS_CONFIGURATION);
}