Class EventEmittingItemProcessListener

All Implemented Interfaces:
org.springframework.batch.core.ItemProcessListener, org.springframework.batch.core.StepListener, org.springframework.core.Ordered

public class EventEmittingItemProcessListener extends Object implements org.springframework.batch.core.ItemProcessListener, org.springframework.core.Ordered
Provides informational messages around the ItemProcessListener of a batch job. The ItemProcessListener.beforeProcess(Object) of this listener is a no-op. ItemProcessListener.afterProcess(Object, Object) returns a message if an item was filtered (ItemProcessor returned null), if the result of the processor was equal to the input (via .equals), or if they were not equal. ItemProcessListener.onProcessError(Object, Exception) provides the exception via the BatchJobHeaders.BATCH_EXCEPTION message header.
Michael Minella, Glenn Renfro, Ali Shahbour
  • Constructor Details

  • Method Details

    • beforeProcess

      public void beforeProcess(Object item)
      Specified by:
      beforeProcess in interface org.springframework.batch.core.ItemProcessListener
    • afterProcess

      public void afterProcess(Object item, Object result)
      Specified by:
      afterProcess in interface org.springframework.batch.core.ItemProcessListener
    • onProcessError

      public void onProcessError(Object item, Exception e)
      Specified by:
      onProcessError in interface org.springframework.batch.core.ItemProcessListener
    • getOrder

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