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. It is also used when processing is interrupted and resumed.
        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.
      • onEnding

        void onEnding()
        This method is called on ending after a successful end (status ending) before the resources are released.
      • onAborting

        void onAborting()
        This method is called in case of an abort (status aborting) before the resources are released.
      • 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 onEnding() or onAborting().
        Throws:
        ProcessingException - Throws this exception in case of releasing failure.
      • resumeProcessing

        void resumeProcessing​(IProcessingUnitProgress processingUnitProgress,
                              IProcessingUnitPersistence processingPersistence)
                       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. The main purpose of this call is to set the processing persistence.
        Parameters:
        processingUnitProgress - the processing unit progress of the processing unit before suspending.
        processingPersistence - the processing persistence to resume after suspending.
        Throws:
        ProcessingException - Throws this exception in case of while resume the processing any failures occurs.