Class LoggingJobListener

  • All Implemented Interfaces:
    com.helger.quartz.IJobListener

    public class LoggingJobListener
    extends Object
    implements com.helger.quartz.IJobListener
    An implementation of the IJobListener interface that logs job executions. Before execution debug log level is used, for vetoed executions warning level is used and after job execution either info (upon success) or error (in case of an execution) is used.
    Author:
    Philip Helger
    • Constructor Detail

      • LoggingJobListener

        public LoggingJobListener()
    • Method Detail

      • getName

        @Nonnull
        @Nonempty
        public String getName()
        Specified by:
        getName in interface com.helger.quartz.IJobListener
      • getJobName

        @Nonnull
        @Nonempty
        protected String getJobName​(@Nonnull
                                    com.helger.quartz.IJobExecutionContext aContext)
      • jobToBeExecuted

        public void jobToBeExecuted​(@Nonnull
                                    com.helger.quartz.IJobExecutionContext aContext)
        Specified by:
        jobToBeExecuted in interface com.helger.quartz.IJobListener
      • jobExecutionVetoed

        public void jobExecutionVetoed​(@Nonnull
                                       com.helger.quartz.IJobExecutionContext aContext)
        Specified by:
        jobExecutionVetoed in interface com.helger.quartz.IJobListener
      • jobWasExecuted

        public void jobWasExecuted​(@Nonnull
                                   com.helger.quartz.IJobExecutionContext aContext,
                                   com.helger.quartz.JobExecutionException aJobException)
        Specified by:
        jobWasExecuted in interface com.helger.quartz.IJobListener