Class TaskResultImpl
java.lang.Object
fr.ens.biologie.genomique.eoulsan.core.workflow.TaskResultImpl
- All Implemented Interfaces:
TaskResult,Serializable
This class define a result for a task context.
- Since:
- 2.0
- Author:
- Laurent Jourdren
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionTaskResultImpl(TaskContextImpl context, Instant startTime, Instant endTime, long duration, Throwable exception, String errorMessage) -
Method Summary
Modifier and TypeMethodDescriptionstatic TaskResultImpldeserialize(DataFile file) Deserialize the TaskResult object.static TaskResultImpldeserialize(File file) Deserialize the TaskResult object.static TaskResultImplDeserialize the TaskResult object.static TaskResultImpldeserialize(Path file) Deserialize the TaskResult object.longGet the duration of the step.Get the error message.Get the exception.booleanTest the result of the step is successful.voidSerialize the TaskResult object.voidSerialize the TaskResult object.final voidserialize(OutputStream out) Serialize the TaskResult object.voidSerialize the TaskResult object.
-
Constructor Details
-
TaskResultImpl
public TaskResultImpl(TaskContextImpl context, Instant startTime, Instant endTime, long duration, Throwable exception, String errorMessage)
-
-
Method Details
-
getDuration
public long getDuration()Description copied from interface:TaskResultGet the duration of the step.- Specified by:
getDurationin interfaceTaskResult- Returns:
- duration in milliseconds
-
isSuccess
public boolean isSuccess()Description copied from interface:TaskResultTest the result of the step is successful.- Specified by:
isSuccessin interfaceTaskResult- Returns:
- Returns the success
-
getException
Description copied from interface:TaskResultGet the exception.- Specified by:
getExceptionin interfaceTaskResult- Returns:
- Returns the exception
-
getErrorMessage
Description copied from interface:TaskResultGet the error message.- Specified by:
getErrorMessagein interfaceTaskResult- Returns:
- Returns the errorMessage
-
serialize
Serialize the TaskResult object.- Parameters:
file- output DataFile- Throws:
IOException- if an error occurs while creating the file
-
serialize
Serialize the TaskResult object.- Parameters:
file- output DataFile- Throws:
IOException- if an error occurs while creating the file
-
serialize
Serialize the TaskResult object.- Parameters:
file- output DataFile- Throws:
IOException- if an error occurs while creating the file
-
serialize
Serialize the TaskResult object.- Parameters:
out- output stream- Throws:
IOException- if an error occurs while creating the file
-
deserialize
Deserialize the TaskResult object.- Parameters:
file- input DataFile- Returns:
- a deserialized TaskResultImpl object
- Throws:
IOException- if an error occurs while reading the file
-
deserialize
Deserialize the TaskResult object.- Parameters:
file- input DataFile- Returns:
- a deserialized TaskResultImpl object
- Throws:
IOException- if an error occurs while reading the file
-
deserialize
Deserialize the TaskResult object.- Parameters:
file- input DataFile- Returns:
- a deserialized TaskResultImpl object
- Throws:
IOException- if an error occurs while reading the file
-
deserialize
Deserialize the TaskResult object.- Parameters:
in- input stream- Returns:
- a deserialized TaskResultImpl object
- Throws:
IOException- if an error occurs while reading the file
-