The batch class is the class in which tasks are created and provided to a service that executes them. The batch class must implements the interface IBatch. Each method corresponds to a step of the batch life cycle. If an exception is throw into one of these methods, then the method manageFatalError will be called and the batch will be shutdown.
Here is the description of all methods :
Initialization method of the batch. The batch configuration (loading from the configuration file in the automatic mode) can be modified here to change the behavior of the batch.
Execution method of the batch. Tasks must be given to the executor service at this time. Called one time, or more if the batch is schedule for a number of loop or at fixed period.
Called then the batch execution has been put into waking through the call of the corresponding JMX operation. No more tasks are executed by the executor service.
Called then the batch execution has been resumed through the call of the corresponding JMX operation. The executor service takes back the tasks execution.
Called at the end of the batch execution. The execution report contains the start date of the execution, the end date, the number of executed tasks, an iterator over the id of the completed and failed tasks.
Called after the end of the execution of a task.
Called if a fatal error occurred. In this case, the batch will be stopped just after this call. A fatal error is an exception throws into one of the batch class method.