Class ExecutorBase<Input,Output>

java.lang.Object
org.chenile.orchestrator.process.utils.base.ExecutorBase<Input,Output>
All Implemented Interfaces:
IWorker<Input>

public abstract class ExecutorBase<Input,Output> extends Object implements IWorker<Input>
  • Field Details

  • Constructor Details

    • ExecutorBase

      public ExecutorBase()
  • Method Details

    • start

      public final void start(WorkerDto workerDto, Input input)
      Specified by:
      start in interface IWorker<Input>
    • doStart

      protected abstract Output doStart(WorkerDto workerDto, Input input)
      Convert input to output. Throw an exception in cases of errors. Exception must extend ErrorNumException
      Call progressUpdate(String,int) progressUpdate} in case you want to update progress.
      Parameters:
      workerDto - - The Worker DTO to work with
      input - - Converted into a Java object from JSON.
      Returns:
      the output that will be sent back to the Process.
    • progressUpdate

      protected void progressUpdate(String processId, int percent)