org.quartz.listeners.JobListenerSupport Java Examples

The following examples show how to use org.quartz.listeners.JobListenerSupport. 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: MessagingServiceTest.java    From rice with Educational Community License v2.0 5 votes vote down vote up
protected void registerJobListener() throws SchedulerException {
    KSBServiceLocator.getScheduler().getListenerManager().addJobListener(new JobListenerSupport() {
        @Override
        public void jobWasExecuted(JobExecutionContext context, JobExecutionException jobException) {
            log.info("Job was executed: " + context);
            if (MessageProcessingJob.NAME.equals(((JobDetailImpl) context.getJobDetail()).getName())) {
                signal.countDown();
            }
        }

        public String getName() {
            return System.currentTimeMillis() + RandomStringUtils.randomAlphanumeric(10);
        }
    });
}