Class LoggingJobListener
- java.lang.Object
-
- com.helger.schedule.quartz.listener.LoggingJobListener
-
- All Implemented Interfaces:
com.helger.quartz.IJobListener
public class LoggingJobListener extends Object implements com.helger.quartz.IJobListener
An implementation of theIJobListenerinterface 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 Summary
Constructors Constructor Description LoggingJobListener()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected StringgetJobName(com.helger.quartz.IJobExecutionContext aContext)StringgetName()voidjobExecutionVetoed(com.helger.quartz.IJobExecutionContext aContext)voidjobToBeExecuted(com.helger.quartz.IJobExecutionContext aContext)voidjobWasExecuted(com.helger.quartz.IJobExecutionContext aContext, com.helger.quartz.JobExecutionException aJobException)
-
-
-
Method Detail
-
getName
@Nonnull @Nonempty public String getName()
- Specified by:
getNamein interfacecom.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:
jobToBeExecutedin interfacecom.helger.quartz.IJobListener
-
jobExecutionVetoed
public void jobExecutionVetoed(@Nonnull com.helger.quartz.IJobExecutionContext aContext)
- Specified by:
jobExecutionVetoedin interfacecom.helger.quartz.IJobListener
-
jobWasExecuted
public void jobWasExecuted(@Nonnull com.helger.quartz.IJobExecutionContext aContext, com.helger.quartz.JobExecutionException aJobException)
- Specified by:
jobWasExecutedin interfacecom.helger.quartz.IJobListener
-
-