public class CompositeRepeatListener extends java.lang.Object implements RepeatListener
Constructor and Description |
---|
CompositeRepeatListener() |
Modifier and Type | Method and Description |
---|---|
void |
after(RepeatContext context,
RepeatStatus result)
Called by the framework after each item has been processed, unless the
item processing results in an exception.
|
void |
before(RepeatContext context)
Called by the framework before each batch item.
|
void |
close(RepeatContext context)
Called once at the end of a complete batch, after normal or abnormal
completion (i.e.
|
void |
onError(RepeatContext context,
java.lang.Throwable e)
Called when a repeat callback fails by throwing an exception.
|
void |
open(RepeatContext context)
Called once at the start of a complete batch, before any items are
processed.
|
void |
register(RepeatListener listener)
Register additional listener.
|
void |
setListeners(RepeatListener[] listeners)
Public setter for the listeners.
|
public void setListeners(RepeatListener[] listeners)
listeners
- array of RepeatListeners to be used by the CompositeRepeatListener.public void register(RepeatListener listener)
listener
- the RepeatListener to be added to the list of listeners to be notified.public void after(RepeatContext context, RepeatStatus result)
RepeatListener
after
in interface RepeatListener
context
- the current batch contextresult
- the result of the callbackpublic void before(RepeatContext context)
RepeatListener
before
in interface RepeatListener
context
- the current batch context.public void close(RepeatContext context)
RepeatListener
close
in interface RepeatListener
context
- the current batch context.public void onError(RepeatContext context, java.lang.Throwable e)
RepeatListener
onError
in interface RepeatListener
context
- the current batch contexte
- the error that was encountered in an item callback.public void open(RepeatContext context)
RepeatListener
open
in interface RepeatListener
context
- the current batch context