Class TaskStatusImpl

java.lang.Object
fr.ens.biologie.genomique.eoulsan.core.workflow.TaskStatusImpl
All Implemented Interfaces:
Progress, TaskStatus

public class TaskStatusImpl extends Object implements TaskStatus
This class define a task status.
Since:
2.0
Author:
Laurent Jourdren
  • Method Details

    • getProgressMessage

      public String getProgressMessage()
      Description copied from interface: Progress
      Get the progress message.
      Specified by:
      getProgressMessage in interface Progress
      Returns:
      the message for the context
    • getCounters

      public Map<String,Long> getCounters()
      Description copied from interface: TaskStatus
      Get the sample counters.
      Specified by:
      getCounters in interface TaskStatus
      Returns:
      the sample counters as a map
    • getDescription

      public String getDescription()
      Description copied from interface: TaskStatus
      Get the context description.
      Specified by:
      getDescription in interface TaskStatus
      Returns:
      a String with the context description
    • getCommandLine

      public String getCommandLine()
      Description copied from interface: TaskStatus
      Get the context command line.
      Specified by:
      getCommandLine in interface TaskStatus
      Returns:
      a String with the context command line
    • getDockerImage

      public String getDockerImage()
      Description copied from interface: TaskStatus
      Get the context docker image.
      Specified by:
      getDockerImage in interface TaskStatus
      Returns:
      a String with the context docker image
    • getProgress

      public double getProgress()
      Description copied from interface: Progress
      Get the progress of the context processing.
      Specified by:
      getProgress in interface Progress
      Returns:
      the progress of the processing of the sample as percent (between 0.0 and 1.0)
    • setProgressMessage

      public void setProgressMessage(String message)
      Description copied from interface: Progress
      Set the progress message.
      Specified by:
      setProgressMessage in interface Progress
      Parameters:
      message - the message to set
    • setDescription

      public void setDescription(String description)
      Description copied from interface: TaskStatus
      Set the context description.
      Specified by:
      setDescription in interface TaskStatus
      Parameters:
      description - the description to set
    • setCommandLine

      public void setCommandLine(String commandLine)
      Description copied from interface: TaskStatus
      Set the context command line.
      Specified by:
      setCommandLine in interface TaskStatus
      Parameters:
      commandLine - the command line to set
    • setDockerImage

      public void setDockerImage(String dockerImage)
      Description copied from interface: TaskStatus
      Set the context docker image.
      Specified by:
      setDockerImage in interface TaskStatus
      Parameters:
      dockerImage - the command line to set
    • setCounters

      public void setCounters(fr.ens.biologie.genomique.kenetre.util.Reporter reporter, String counterGroup)
      Description copied from interface: TaskStatus
      Set the context counters.
      Specified by:
      setCounters in interface TaskStatus
      Parameters:
      reporter - the reporter
      counterGroup - counter group to use with the reporter
    • setProgress

      public void setProgress(int min, int max, int value)
      Description copied from interface: Progress
      Set the progress of the processing.
      Specified by:
      setProgress in interface Progress
      Parameters:
      min - minimal value of the progress
      max - maximal value of the progress
      value - current value of the progress
    • setProgress

      public void setProgress(double progress)
      Description copied from interface: Progress
      Set the progress of the processing.
      Specified by:
      setProgress in interface Progress
      Parameters:
      progress - value of the progress. This value must be greater or equals to 0 and lower or equals to 1.0
    • createTaskResult

      public TaskResult createTaskResult()
      Description copied from interface: TaskStatus
      Create a TaskResult object for a successful result.
      Specified by:
      createTaskResult in interface TaskStatus
      Returns:
      a TaskResult object
    • createTaskResult

      public TaskResult createTaskResult(boolean success)
      Description copied from interface: TaskStatus
      Create a TaskResult object.
      Specified by:
      createTaskResult in interface TaskStatus
      Parameters:
      success - true if the task is successful
      Returns:
      a TaskResult object
    • createTaskResult

      public TaskResult createTaskResult(Throwable exception, String exceptionMessage)
      Description copied from interface: TaskStatus
      Create a TaskResult object.
      Specified by:
      createTaskResult in interface TaskStatus
      Parameters:
      exception - exception of the error
      exceptionMessage - Error message
      Returns:
      a TaskResult object
    • createTaskResult

      public TaskResult createTaskResult(Throwable exception)
      Description copied from interface: TaskStatus
      Create a TaskResult object.
      Specified by:
      createTaskResult in interface TaskStatus
      Parameters:
      exception - exception of the error
      Returns:
      a TaskResult object