Class DefaultWorkReport
- java.lang.Object
-
- com.redhat.parodos.workflows.work.DefaultWorkReport
-
- All Implemented Interfaces:
WorkReport
public class DefaultWorkReport extends Object implements WorkReport
Default implementation ofWorkReport.- Author:
- Mahmoud Ben Hassine (mahmoud.benhassine@icloud.com)
-
-
Constructor Summary
Constructors Constructor Description DefaultWorkReport(WorkStatus status, WorkContext workContext)Create a newDefaultWorkReport.DefaultWorkReport(WorkStatus status, WorkContext workContext, Throwable error)Create a newDefaultWorkReport.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ThrowablegetError()Get error if any.WorkStatusgetStatus()Get work execution status.WorkContextgetWorkContext()Get the last work context of the flowStringtoString()
-
-
-
Constructor Detail
-
DefaultWorkReport
public DefaultWorkReport(WorkStatus status, WorkContext workContext)
Create a newDefaultWorkReport.- Parameters:
status- of work
-
DefaultWorkReport
public DefaultWorkReport(WorkStatus status, WorkContext workContext, Throwable error)
Create a newDefaultWorkReport.- Parameters:
status- of workerror- if any
-
-
Method Detail
-
getStatus
public WorkStatus getStatus()
Description copied from interface:WorkReportGet work execution status.- Specified by:
getStatusin interfaceWorkReport- Returns:
- execution status
-
getError
public Throwable getError()
Description copied from interface:WorkReportGet error if any. Might benull, but usually not null when the status isWorkStatus.FAILED. Typically the exception includes the exit code that might be used to drive the flow execution accordingly.- Specified by:
getErrorin interfaceWorkReport- Returns:
- error
-
getWorkContext
public WorkContext getWorkContext()
Description copied from interface:WorkReportGet the last work context of the flow- Specified by:
getWorkContextin interfaceWorkReport- Returns:
- last work context of the flow
-
-