Package step.core.plans.runner
Class PlanRunnerResult
java.lang.Object
step.core.plans.runner.PlanRunnerResult
- Direct Known Subclasses:
RemoteExecutionFuture
,RemotePlanRunner.RemotePlanRunnerResult
This class provides an API for the manipulation of plan executions
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final String
protected final ReportTreeAccessor
protected final ResourceManager
protected final String
-
Constructor Summary
ConstructorsConstructorDescriptionPlanRunnerResult
(String executionId, String rootReportNodeId, ReportTreeAccessor reportTreeAccessor) PlanRunnerResult
(String executionId, String rootReportNodeId, ReportTreeAccessor reportTreeAccessor, ResourceManager resourceManager) -
Method Summary
Modifier and TypeMethodDescriptionprotected ReportTreeVisitor
Prints the result tree to the standard outputPrints the result tree to theWriter
provided as inputPrints the result tree to theWriter
provided as inputPrints the result tree to theWriter
provided as inputvisitReportNodes
(Consumer<ReportNode> consumer) Visits the report tree of the execution using theConsumer
ofReportNode
Visits the report tree of the execution using theConsumer
ofReportTreeVisitor.ReportNodeEvent
Wait indefinitely for an the execution to terminatewaitForExecutionToTerminate
(long timeout) Wait for an the execution to terminatewriteReport
(ReportWriter reportWriter, File outputFile) Writes a report of the execution using the providedReportWriter
-
Field Details
-
executionId
-
rootReportNodeId
-
reportTreeAccessor
-
resourceManager
-
-
Constructor Details
-
PlanRunnerResult
public PlanRunnerResult(String executionId, String rootReportNodeId, ReportTreeAccessor reportTreeAccessor) -
PlanRunnerResult
public PlanRunnerResult(String executionId, String rootReportNodeId, ReportTreeAccessor reportTreeAccessor, ResourceManager resourceManager)
-
-
Method Details
-
getResult
-
getExecutionId
-
getReportTreeAccessor
-
visitReportNodes
Visits the report tree of the execution using theConsumer
ofReportNode
- Parameters:
consumer
-- Returns:
-
visitReportTree
Visits the report tree of the execution using theConsumer
ofReportTreeVisitor.ReportNodeEvent
- Parameters:
consumer
-- Returns:
-
getReportTreeVisitor
-
waitForExecutionToTerminate
public PlanRunnerResult waitForExecutionToTerminate(long timeout) throws TimeoutException, InterruptedException Wait for an the execution to terminate- Parameters:
timeout
- the timeout in ms- Returns:
- Throws:
TimeoutException
InterruptedException
-
waitForExecutionToTerminate
Wait indefinitely for an the execution to terminate- Returns:
- Throws:
TimeoutException
InterruptedException
-
printTree
Prints the result tree to the standard output- Returns:
- Throws:
IOException
-
printTree
Prints the result tree to theWriter
provided as input- Parameters:
writer
-- Returns:
- Throws:
IOException
-
printTree
Prints the result tree to theWriter
provided as input- Parameters:
writer
-printAttachments
- if the attachments of the report nodes have to be printed out (currently restricted to attachments called "exception.log")- Returns:
- Throws:
IOException
-
printTree
public PlanRunnerResult printTree(Writer writer, boolean printNodeDetails, boolean printAttachments) throws IOException Prints the result tree to theWriter
provided as input- Parameters:
writer
-printNodeDetails
- if the details of the report nodes should be printed outprintAttachments
- if the attachments of the report nodes have to be printed out (currently restricted to attachments called "exception.log")- Returns:
- Throws:
IOException
-
getTreeAsString
- Throws:
IOException
-
writeReport
Writes a report of the execution using the providedReportWriter
- Parameters:
reportWriter
- theReportWriter
to be used to write the reportoutputFile
- the output file of the report- Returns:
- this instance
- Throws:
IOException
- if an exception occurs while writing the report
-