Interface IPipelineStep

    • Method Detail

      • runPipelineSteps

        static <T> T runPipelineSteps​(List<Function<T,​T>> functions,
                                      T t)
        Given a collection of IPipelineStep execute them in sequence given a Stream input. Functions take the output of the previous step as the input of the current step etc. Similar to running a pipeline.
        Parameters:
        functions - List of Function, Stream>
        t - Stream
        Returns:
        Stream
      • getParameters

        IParameters getParameters()
        Gets the current parameters for this step.
        Returns:
        the current parameters for this step or null if there are no parameters.
      • setParameters

        void setParameters​(IParameters params)
        Sets new parameters for this step.
        Parameters:
        params - the new parameters to use.
      • getName

        String getName()
        Gets the localizable name of this step.
        Returns:
        the localizable name of this step.
      • getDescription

        String getDescription()
        Gets a short localizable description of what this step does.
        Returns:
        the text of a short description of what this step does.
      • getHelpLocation

        String getHelpLocation()
        Gets the relative directory location for the help of this step. The main help file for the step must be at that location and its name must be the name of the class implementing the step in lowercase with a .html extension.
        Returns:
        the relative directory location for the help of this step.
      • handleEvent

        Event handleEvent​(Event event)
        Processes each event sent though the pipeline.
        Parameters:
        event - the event to process.
        Returns:
        the event to pass down the pipeline.
      • handleStream

        default Stream<Event> handleStream​(Event event)
        Processes a stream of events sent though the pipeline.
        Parameters:
        event - the event to process.
        Returns:
        the stream to pass down the pipeline.
      • isDone

        boolean isDone()
        Steps that can generate Events such as IFilters return false until no more events can be created. Steps which do not create Events always return true.
        Returns:
        false if can generate more events, true otherwise.
      • destroy

        @Deprecated
        default void destroy()
        Deprecated.
        use close() method
        Executes any cleanup code for this step. Called once at the end of the pipeline lifecycle.
      • cancel

        void cancel()
        Cancel processing on this pipeline. Each IPipelineStep is responsible to implement a cancel method that will interrupt long running operations
      • isLastOutputStep

        boolean isLastOutputStep()
        Is this step the last step with output in the pipeline?
        Returns:
        true if last step with output, false otherwise.
      • setLastOutputStep

        void setLastOutputStep​(boolean isLastStep)
        Tell the step if it is the last one on the pipeline with output.
        Parameters:
        isLastStep - true if last step with output, false otherwise.
      • getSourceLocale

        default LocaleId getSourceLocale()
        Delegate to concrete class
        Returns:
        LocaleId
      • setSourceLocale

        default void setSourceLocale​(LocaleId sourceLocale)
        Delegate to concrete class
        Parameters:
        sourceLocale -
      • getTargetLocale

        default LocaleId getTargetLocale()
        Delegate to concrete class
        Returns:
        LocaleId
      • setTargetLocale

        default void setTargetLocale​(LocaleId targetLocale)