Java 类org.quartz.listeners.JobListenerSupport 实例源码

项目:kc-rice    文件:MessagingServiceTest.java   
protected void registerJobListener() throws SchedulerException {
    KSBServiceLocator.getScheduler().addGlobalJobListener(new JobListenerSupport() {
        @Override
        public void jobWasExecuted(JobExecutionContext context, JobExecutionException jobException) {
            log.info("Job was executed: " + context);
            if (MessageProcessingJob.NAME.equals(context.getJobDetail().getName())) {
                signal.countDown();
            }
        }
        public String getName() {
            return System.currentTimeMillis() + RandomStringUtils.randomAlphanumeric(10);
        }
    });
}
项目:rice    文件:MessagingServiceTest.java   
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);
        }
    });
}
项目:kuali_rice    文件:MessagingServiceTest.java   
protected void registerJobListener() throws SchedulerException {
    KSBServiceLocator.getScheduler().addGlobalJobListener(new JobListenerSupport() {
        @Override
        public void jobWasExecuted(JobExecutionContext context, JobExecutionException jobException) {
            log.info("Job was executed: " + context);
            if (MessageProcessingJob.NAME.equals(context.getJobDetail().getName())) {
                signal.countDown();
            }
        }
        public String getName() {
            return System.currentTimeMillis() + RandomStringUtils.randomAlphanumeric(10);
        }
    });
}