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 Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TaskResultcreateTaskResult()Create a TaskResult object for a successful result.TaskResultcreateTaskResult(boolean success)Create a TaskResult object.TaskResultcreateTaskResult(Throwable exception)Create a TaskResult object.TaskResultcreateTaskResult(Throwable exception, String exceptionMessage)Create a TaskResult object.StringgetCommandLine()Get the context command line.Map<String,Long>getCounters()Get the sample counters.StringgetDescription()Get the context description.doublegetProgress()Get the progress of the context processing.StringgetProgressMessage()Get the progress message.voidsetCommandLine(String commandLine)Set the context command line.voidsetCounters(fr.ens.biologie.genomique.kenetre.util.Reporter reporter, String counterGroup)Set the context counters.voidsetDescription(String description)Set the context description.voidsetProgress(double progress)Set the progress of the processing.voidsetProgress(int min, int max, int value)Set the progress of the processing.voidsetProgressMessage(String message)Set the progress message.
-
-
-
Method Detail
-
getProgressMessage
public String getProgressMessage()
Description copied from interface:ProgressGet the progress message.- Specified by:
getProgressMessagein interfaceProgress- Returns:
- the message for the context
-
getCounters
public Map<String,Long> getCounters()
Description copied from interface:TaskStatusGet the sample counters.- Specified by:
getCountersin interfaceTaskStatus- Returns:
- the sample counters as a map
-
getDescription
public String getDescription()
Description copied from interface:TaskStatusGet the context description.- Specified by:
getDescriptionin interfaceTaskStatus- Returns:
- a String with the context description
-
getCommandLine
public String getCommandLine()
Description copied from interface:TaskStatusGet the context command line.- Specified by:
getCommandLinein interfaceTaskStatus- Returns:
- a String with the context command line
-
getProgress
public double getProgress()
Description copied from interface:ProgressGet the progress of the context processing.- Specified by:
getProgressin interfaceProgress- 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:ProgressSet the progress message.- Specified by:
setProgressMessagein interfaceProgress- Parameters:
message- the message to set
-
setDescription
public void setDescription(String description)
Description copied from interface:TaskStatusSet the context description.- Specified by:
setDescriptionin interfaceTaskStatus- Parameters:
description- the description to set
-
setCommandLine
public void setCommandLine(String commandLine)
Description copied from interface:TaskStatusSet the context command line.- Specified by:
setCommandLinein interfaceTaskStatus- Parameters:
commandLine- the command line to set
-
setCounters
public void setCounters(fr.ens.biologie.genomique.kenetre.util.Reporter reporter, String counterGroup)Description copied from interface:TaskStatusSet the context counters.- Specified by:
setCountersin interfaceTaskStatus- Parameters:
reporter- the reportercounterGroup- counter group to use with the reporter
-
setProgress
public void setProgress(int min, int max, int value)Description copied from interface:ProgressSet the progress of the processing.- Specified by:
setProgressin interfaceProgress- Parameters:
min- minimal value of the progressmax- maximal value of the progressvalue- current value of the progress
-
setProgress
public void setProgress(double progress)
Description copied from interface:ProgressSet the progress of the processing.- Specified by:
setProgressin interfaceProgress- 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:TaskStatusCreate a TaskResult object for a successful result.- Specified by:
createTaskResultin interfaceTaskStatus
-
createTaskResult
public TaskResult createTaskResult(boolean success)
Description copied from interface:TaskStatusCreate a TaskResult object.- Specified by:
createTaskResultin interfaceTaskStatus- Parameters:
success- true if the task is successful
-
createTaskResult
public TaskResult createTaskResult(Throwable exception, String exceptionMessage)
Description copied from interface:TaskStatusCreate a TaskResult object.- Specified by:
createTaskResultin interfaceTaskStatus- Parameters:
exception- exception of the errorexceptionMessage- Error message
-
createTaskResult
public TaskResult createTaskResult(Throwable exception)
Description copied from interface:TaskStatusCreate a TaskResult object.- Specified by:
createTaskResultin interfaceTaskStatus- Parameters:
exception- exception of the error
-
-