Class CronJobErrorHandler

  • All Implemented Interfaces:
    ErrorHandler

    public class CronJobErrorHandler
    extends java.lang.Object
    implements ErrorHandler
    An ErrorHandler designed for CronJobs. An CronJob already has an enumaration value for defining the error mode. Possible values are fail, pause and ignore. This ErrorHandler uses this value for finding an decision concerning the error processing. The following mapping will be used:
    • error mode is fail -> result is FAIL
    • error mode is pause -> result is FAIL with log of a warning
    • error mode is ignore -> result is IGNORE
    • Constructor Detail

      • CronJobErrorHandler

        public CronJobErrorHandler​(CronJob cronjob)
        Creates a new instance with given CronJob used for error evaluation.
        Parameters:
        cronjob - instance used for evaluating the error decision
    • Method Detail

      • handleError

        public ErrorHandler.RESULT handleError​(ImpExException impexException,
                                               ImpExReader reader)
        Description copied from interface: ErrorHandler
        Evaluated the given error and finds a decision concerning the further ImpEx processing. Possible results are continuing of processing or stopping and throwing the error. For evaluation of the given error, the input reader instance is given.
        Specified by:
        handleError in interface ErrorHandler
        Parameters:
        impexException - the ImpEx error occurred while ImpEx process
        reader - the input reader instance for getting further informations of the current process
        Returns:
        the decision concerning further processing