Summer.Batch.Infrastructure.Repeat.IRepeatListener Interface Reference

Interface for listeners to the batch process. Implementers can provide enhance the behaviour of a batch in small cross-cutting modules. The framework provides callbacks at key points in the processing. More...

Public Member Functions

void Before (IRepeatContext context)
 Called by the framework before each batch item. Implementers can halt a batch by setting the complete flag on the context. More...
 
void After (IRepeatContext context, RepeatStatus result)
 Called by the framework after each item has been processed, unless the item processing results in an exception. This method is called as soon as the result is known. More...
 
void Open (IRepeatContext context)
 Called once at the start of a complete batch, before any items are processed. Implementers can use this method to acquire any resources that might be needed during processing. Implementers can halt the current operation by setting the complete flag on the context. To halt all enclosing batches (the whole job), the would need to use the parent context (recursively). More...
 
void OnError (IRepeatContext context, System.Exception e)
 Called when a repeat callback fails by throwing an exception. There will be one call to this method for each exception thrown during a repeat operation (e.g. a chunk). There is no need to re-throw the exception here - that will be done by the enclosing framework. More...
 
void Close (IRepeatContext context)
 Called once at the end of a complete batch, after normal or abnormal completion (i.e. even after an exception). Implementers can use this method to clean up any resources. More...
 

Detailed Description

Interface for listeners to the batch process. Implementers can provide enhance the behaviour of a batch in small cross-cutting modules. The framework provides callbacks at key points in the processing.

Member Function Documentation

void Summer.Batch.Infrastructure.Repeat.IRepeatListener.After ( IRepeatContext  context,
RepeatStatus  result 
)

Called by the framework after each item has been processed, unless the item processing results in an exception. This method is called as soon as the result is known.

Parameters
context
result
void Summer.Batch.Infrastructure.Repeat.IRepeatListener.Before ( IRepeatContext  context)

Called by the framework before each batch item. Implementers can halt a batch by setting the complete flag on the context.

Parameters
context
void Summer.Batch.Infrastructure.Repeat.IRepeatListener.Close ( IRepeatContext  context)

Called once at the end of a complete batch, after normal or abnormal completion (i.e. even after an exception). Implementers can use this method to clean up any resources.

Parameters
context
void Summer.Batch.Infrastructure.Repeat.IRepeatListener.OnError ( IRepeatContext  context,
System.Exception  e 
)

Called when a repeat callback fails by throwing an exception. There will be one call to this method for each exception thrown during a repeat operation (e.g. a chunk). There is no need to re-throw the exception here - that will be done by the enclosing framework.

Parameters
context
e
void Summer.Batch.Infrastructure.Repeat.IRepeatListener.Open ( IRepeatContext  context)

Called once at the start of a complete batch, before any items are processed. Implementers can use this method to acquire any resources that might be needed during processing. Implementers can halt the current operation by setting the complete flag on the context. To halt all enclosing batches (the whole job), the would need to use the parent context (recursively).

Parameters
context

The documentation for this interface was generated from the following file:
  • Summer.Batch.Infrastructure/Repeat/IRepeatListener.cs