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 TypeMethodDescriptiongetErrorCodes(int limit) Stream<step.core.reports.Error>protected 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
-
getRootReportNode
-
getReportNodesWithErrors
- Returns:
- a stream of all report nodes with errors that caused this execution to fail.
This returns only the so-called contributing errors according to following definition
ReportNode.getContributingError()
-
getErrors
- Returns:
- a stream of all errors that caused this execution to fail.
This returns only the so-called contributing errors according to following definition
ReportNode.getContributingError()
-
getErrorSummary
- Returns:
- a concatenation of the first 10 error messages that caused this execution to fail.
This considers only the so-called contributing errors according to following definition
ReportNode.getContributingError()
-
getErrorCodes
- Parameters:
limit- the max errors to be scanned- Returns:
- a
Setcontaining the error codes of the first n errors where n is set by the limit parameter.
-
getExecutionId
-
getReportTreeAccessor
-
visitReportNodes
Visits the report tree of the execution using theConsumerofReportNode- Parameters:
consumer- the visitor- Returns:
- this instance
-
visitReportTree
Visits the report tree of the execution using theConsumerofReportTreeVisitor.ReportNodeEvent- Parameters:
consumer- the visitor- Returns:
- this instance
-
getReportTreeVisitor
-
waitForExecutionToTerminate
public PlanRunnerResult waitForExecutionToTerminate(long timeout) throws TimeoutException, InterruptedException Wait for an the execution to terminate- Parameters:
timeout- the timeout in ms- Returns:
- this instance
- Throws:
TimeoutExceptionInterruptedException
-
waitForExecutionToTerminate
Wait indefinitely for an the execution to terminate- Returns:
- this instance
- Throws:
TimeoutExceptionInterruptedException
-
printTree
Prints the result tree to the standard output- Returns:
- this instance
- Throws:
IOException
-
printTree
Prints the result tree to theWriterprovided as input- Parameters:
writer-- Returns:
- this instance
- 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:
- this instance
- 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:
- this instance
- 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
-