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 Stringprotected final ReportTreeAccessorprotected final ResourceManagerprotected 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 ReportTreeVisitorPrints the result tree to the standard outputPrints the result tree to theWriterprovided as inputPrints the result tree to theWriterprovided as inputPrints the result tree to theWriterprovided as inputvisitReportNodes(Consumer<ReportNode> consumer) Visits the report tree of the execution using theConsumerofReportNodeVisits the report tree of the execution using theConsumerofReportTreeVisitor.ReportNodeEventWait 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 theConsumerofReportNode- Parameters:
consumer-- Returns:
-
visitReportTree
Visits the report tree of the execution using theConsumerofReportTreeVisitor.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:
TimeoutExceptionInterruptedException
-
waitForExecutionToTerminate
Wait indefinitely for an the execution to terminate- Returns:
- Throws:
TimeoutExceptionInterruptedException
-
printTree
Prints the result tree to the standard output- Returns:
- Throws:
IOException
-
printTree
Prints the result tree to theWriterprovided as input- Parameters:
writer-- Returns:
- Throws:
IOException
-
printTree
Prints the result tree to theWriterprovided 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 theWriterprovided 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- theReportWriterto 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
-