Class EventEmittingItemReadListener

java.lang.Object
org.springframework.cloud.task.batch.listener.EventEmittingItemReadListener
All Implemented Interfaces:
org.springframework.batch.core.ItemReadListener, org.springframework.batch.core.StepListener, org.springframework.core.Ordered

public class EventEmittingItemReadListener extends Object implements org.springframework.batch.core.ItemReadListener, org.springframework.core.Ordered
Provides informational messages around the ItemReader of a batch job. The ItemReadListener.beforeRead() and ItemReadListener.afterRead(Object) are both no-ops in this implementation. ItemReadListener.onReadError(Exception) provides the exception via the BatchJobHeaders.BATCH_EXCEPTION message header.
Author:
Glenn Renfro, Ali Shahbour
  • Constructor Details

  • Method Details

    • beforeRead

      public void beforeRead()
      Specified by:
      beforeRead in interface org.springframework.batch.core.ItemReadListener
    • afterRead

      public void afterRead(Object item)
      Specified by:
      afterRead in interface org.springframework.batch.core.ItemReadListener
    • onReadError

      public void onReadError(Exception ex)
      Specified by:
      onReadError in interface org.springframework.batch.core.ItemReadListener
    • getOrder

      public int getOrder()
      Specified by:
      getOrder in interface org.springframework.core.Ordered