Class TaskResultImpl

java.lang.Object
fr.ens.biologie.genomique.eoulsan.core.workflow.TaskResultImpl
All Implemented Interfaces:
TaskResult, Serializable

public class TaskResultImpl extends Object implements TaskResult, Serializable
This class define a result for a task context.
Since:
2.0
Author:
Laurent Jourdren
See Also:
  • Constructor Details

  • Method Details

    • getDuration

      public long getDuration()
      Description copied from interface: TaskResult
      Get the duration of the step.
      Specified by:
      getDuration in interface TaskResult
      Returns:
      duration in milliseconds
    • isSuccess

      public boolean isSuccess()
      Description copied from interface: TaskResult
      Test the result of the step is successful.
      Specified by:
      isSuccess in interface TaskResult
      Returns:
      Returns the success
    • getException

      public Throwable getException()
      Description copied from interface: TaskResult
      Get the exception.
      Specified by:
      getException in interface TaskResult
      Returns:
      Returns the exception
    • getErrorMessage

      public String getErrorMessage()
      Description copied from interface: TaskResult
      Get the error message.
      Specified by:
      getErrorMessage in interface TaskResult
      Returns:
      Returns the errorMessage
    • serialize

      public void serialize(Path file) throws IOException
      Serialize the TaskResult object.
      Parameters:
      file - output DataFile
      Throws:
      IOException - if an error occurs while creating the file
    • serialize

      public void serialize(File file) throws IOException
      Serialize the TaskResult object.
      Parameters:
      file - output DataFile
      Throws:
      IOException - if an error occurs while creating the file
    • serialize

      public void serialize(DataFile file) throws IOException
      Serialize the TaskResult object.
      Parameters:
      file - output DataFile
      Throws:
      IOException - if an error occurs while creating the file
    • serialize

      public final void serialize(OutputStream out) throws IOException
      Serialize the TaskResult object.
      Parameters:
      out - output stream
      Throws:
      IOException - if an error occurs while creating the file
    • deserialize

      public static TaskResultImpl deserialize(Path file) throws IOException
      Deserialize the TaskResult object.
      Parameters:
      file - input DataFile
      Returns:
      a deserialized TaskResultImpl object
      Throws:
      IOException - if an error occurs while reading the file
    • deserialize

      public static TaskResultImpl deserialize(File file) throws IOException
      Deserialize the TaskResult object.
      Parameters:
      file - input DataFile
      Returns:
      a deserialized TaskResultImpl object
      Throws:
      IOException - if an error occurs while reading the file
    • deserialize

      public static TaskResultImpl deserialize(DataFile file) throws IOException
      Deserialize the TaskResult object.
      Parameters:
      file - input DataFile
      Returns:
      a deserialized TaskResultImpl object
      Throws:
      IOException - if an error occurs while reading the file
    • deserialize

      public static TaskResultImpl deserialize(InputStream in) throws IOException
      Deserialize the TaskResult object.
      Parameters:
      in - input stream
      Returns:
      a deserialized TaskResultImpl object
      Throws:
      IOException - if an error occurs while reading the file