Interface IProcessingUnit

    • Method Detail

      • getParameterDefinition

        java.util.List<ParameterDefinition> getParameterDefinition()
        Gets the parameter definition list of the processing.
        Returns:
        the parameter definition list or null in case of no parameters
      • validateParameterList

        void validateParameterList​(java.util.List<Parameter> parameterList)
                            throws ValidationException
        Validate the parameter list consistency of this class with the parameters. Typical it will be called during the initialization. It can be used to verify if the parameter of this processing are well defined.
        Parameters:
        parameterList - the parameter list.
        Throws:
        ValidationException - This will be throw in case the consistency check failures.
      • initialize

        void initialize​(java.util.List<Parameter> parameterList,
                        IProcessingUnitContext processingUnitContext)
                 throws ValidationException,
                        ProcessingException
        Initializes the processing unit. This will called as first to initialize the processing unit.
        Parameters:
        parameterList - the parameter list to run the processing.
        processingUnitContext - the processing context.
        Throws:
        ValidationException - This will be throw in case the consistency check failures.
        ProcessingException - Throws this exception in case of initialization failures.
      • onSuccess

        void onSuccess()
        This method will be called after a success end.
      • onStop

        void onStop()
        This method will be called in case on a stop before.
      • releaseResource

        void releaseResource()
                      throws ProcessingException
        Release resources will be called to release all internal referenced resources after a processing success, error or by a suspendProcessing (see method below). It will be called after onSuccess or onStop.
        Throws:
        ProcessingException - Throws this exception in case of releasing failure.
      • resumeProcessing

        void resumeProcessing​(IProcessingUnitPersistence processingPersistence,
                              IProcessingUnitContext processingUnitContext)
                       throws ProcessingException
        After suspending a processing unit can be resumed. The parameter list of the initialization is passed as well the IProcessingUnitPersistence which was returned by the suspendProcessing method.
        Parameters:
        processingPersistence - the processing persistence to resume after suspending.
        processingUnitContext - the processing unit context
        Throws:
        ProcessingException - Throws this exception in case of while resume the processing any failures occurs.