Class TaskBatchEventListenerBeanPostProcessor

java.lang.Object
org.springframework.cloud.task.batch.listener.support.TaskBatchEventListenerBeanPostProcessor
All Implemented Interfaces:
org.springframework.beans.factory.config.BeanPostProcessor

public class TaskBatchEventListenerBeanPostProcessor extends Object implements org.springframework.beans.factory.config.BeanPostProcessor
Attaches the listeners to the job and its steps. Based on the type of bean that is being processed will determine what listener is attached.
  • If the bean is of type AbstactJob then the JobExecutionListener is registered with this bean.
  • If the bean is of type AbstactStep then the StepExecutionListener is registered with this bean.
  • If the bean is of type TaskletStep then the ChunkEventListener is registered with this bean.
  • If the tasklet for the TaskletStep is of type ChunkOrientedTasklet the following listeners will be registered.
    • ItemReadListener with the ChunkProvider.
    • ItemProcessListener with the ChunkProcessor.
    • ItemWriteEventsListener with the ChunkProcessor.
    • SkipEventsListener with the ChunkProcessor.
Author:
Michael Minella, Glenn Renfro
  • Constructor Details

    • TaskBatchEventListenerBeanPostProcessor

      public TaskBatchEventListenerBeanPostProcessor()
  • Method Details

    • postProcessBeforeInitialization

      public Object postProcessBeforeInitialization(Object bean, String beanName) throws org.springframework.beans.BeansException
      Specified by:
      postProcessBeforeInitialization in interface org.springframework.beans.factory.config.BeanPostProcessor
      Throws:
      org.springframework.beans.BeansException
    • postProcessAfterInitialization

      public Object postProcessAfterInitialization(Object bean, String beanName) throws org.springframework.beans.BeansException
      Specified by:
      postProcessAfterInitialization in interface org.springframework.beans.factory.config.BeanPostProcessor
      Throws:
      org.springframework.beans.BeansException