Class MailNotificationJobListener

  • All Implemented Interfaces:
    org.springframework.batch.core.JobExecutionListener, org.springframework.batch.core.StepExecutionListener, org.springframework.batch.core.StepListener

    public class MailNotificationJobListener
    extends java.lang.Object
    implements org.springframework.batch.core.JobExecutionListener, org.springframework.batch.core.StepExecutionListener
    Sends email notifications when jobs finish.
    Author:
    arbinmat
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void afterJob​(org.springframework.batch.core.JobExecution jobExecution)  
      org.springframework.batch.core.ExitStatus afterStep​(org.springframework.batch.core.StepExecution stepExecution)  
      void beforeJob​(org.springframework.batch.core.JobExecution jobExecution)  
      void beforeStep​(org.springframework.batch.core.StepExecution stepExecution)  
      void sendMail​(org.springframework.batch.core.JobExecution jobExecution, org.springframework.batch.core.ExitStatus exitStatus)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • MailNotificationJobListener

        public MailNotificationJobListener()
    • Method Detail

      • afterJob

        public void afterJob​(org.springframework.batch.core.JobExecution jobExecution)
        Specified by:
        afterJob in interface org.springframework.batch.core.JobExecutionListener
      • afterStep

        public org.springframework.batch.core.ExitStatus afterStep​(org.springframework.batch.core.StepExecution stepExecution)
        Specified by:
        afterStep in interface org.springframework.batch.core.StepExecutionListener
      • beforeJob

        public void beforeJob​(org.springframework.batch.core.JobExecution jobExecution)
        Specified by:
        beforeJob in interface org.springframework.batch.core.JobExecutionListener
      • beforeStep

        public void beforeStep​(org.springframework.batch.core.StepExecution stepExecution)
        Specified by:
        beforeStep in interface org.springframework.batch.core.StepExecutionListener
      • sendMail

        public void sendMail​(org.springframework.batch.core.JobExecution jobExecution,
                             org.springframework.batch.core.ExitStatus exitStatus)