Class ExecutionPlan
-
- All Implemented Interfaces:
public class ExecutionPlanAn executable plan that contains a tree of execution nodes
-
-
Field Summary
Fields Modifier and Type Field Description private final ExecutionPlanNodeplanRoot
-
Constructor Summary
Constructors Constructor Description ExecutionPlan(String label)Creates a new empty execution plan with a single root container ExecutionPlan(ExecutionPlanNode planRoot)
-
Method Summary
Modifier and Type Method Description final ExecutionPlanNodegetPlanRoot()Root node for the plan tree final Unitadd(ExecutionPlanNode node)Adds the node as the root node if the node is not empty (i.e. final StringstrForm()Returns the serialised text form of the execution plan. final StringprettyForm()Returns the human-readable text form of the execution plan. final StringgenerateSummary(Boolean ansiColor)Return a summary of the execution to display in a console final ExecutionPlanNodefetchNode(List<String> path)Walks the tree to return any node that matches the given path final RequestMatchResultintoRequestMatchResult()Returns a standard Pact request match result for the executed plan final ResponseMatchResultintoResponseMatchResult()Returns a standard Pact response match result for the executed plan final MessageMatchResultintoMessageMatchResult()Returns a match result for the executed message interaction plan final ExecutionPlanexecute(PlanMatchingContext context, ValueResolver valueResolver)Executes the plan, returning the resulting plan -
-
Constructor Detail
-
ExecutionPlan
ExecutionPlan(String label)
Creates a new empty execution plan with a single root container
-
ExecutionPlan
ExecutionPlan(ExecutionPlanNode planRoot)
-
-
Method Detail
-
getPlanRoot
final ExecutionPlanNode getPlanRoot()
Root node for the plan tree
-
add
final Unit add(ExecutionPlanNode node)
Adds the node as the root node if the node is not empty (i.e. not a leaf node).
-
prettyForm
final String prettyForm()
Returns the human-readable text form of the execution plan.
-
generateSummary
final String generateSummary(Boolean ansiColor)
Return a summary of the execution to display in a console
-
fetchNode
final ExecutionPlanNode fetchNode(List<String> path)
Walks the tree to return any node that matches the given path
-
intoRequestMatchResult
final RequestMatchResult intoRequestMatchResult()
Returns a standard Pact request match result for the executed plan
-
intoResponseMatchResult
final ResponseMatchResult intoResponseMatchResult()
Returns a standard Pact response match result for the executed plan
-
intoMessageMatchResult
final MessageMatchResult intoMessageMatchResult()
Returns a match result for the executed message interaction plan
-
execute
final ExecutionPlan execute(PlanMatchingContext context, ValueResolver valueResolver)
Executes the plan, returning the resulting plan
-
-
-
-