Package net.officefloor.frame.test
Class CompleteFlowCallback
java.lang.Object
net.officefloor.frame.test.CompleteFlowCallback
- All Implemented Interfaces:
FlowCallback
- Direct Known Subclasses:
SafeCompleteFlowCallback
FlowCallback that checks on completion and propagates failures.- Author:
- Daniel Sagenschneider
-
Field Summary
FieldsFields inherited from interface net.officefloor.frame.api.function.FlowCallback
ESCALATE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAsserts theFlowis complete.voidassertComplete(ThreadedTestSupport threading) Asserts theFlowis complete.voidAsserts theFlowis not complete.voidassertNotComplete(ThreadedTestSupport threading) Asserts theFlowis not complete.voidInvoked on completion of theFlow.
-
Field Details
-
isComplete
protected volatile boolean isCompleteIndicates ifFlowis complete.
-
-
Constructor Details
-
CompleteFlowCallback
public CompleteFlowCallback()
-
-
Method Details
-
assertComplete
Asserts theFlowis complete.- Throws:
Exception- If failure in execution.
-
assertComplete
Asserts theFlowis complete.- Parameters:
threading-ThreadedTestSupportto wait for completion. Necessary if spawningThreadState.- Throws:
Exception- If failure in execution.
-
assertNotComplete
Asserts theFlowis not complete.- Throws:
Exception- If failure in execution.
-
assertNotComplete
Asserts theFlowis not complete.- Parameters:
threading-ThreadedTestSupportto wait for completion. Necessary if spawningThreadState.- Throws:
Exception- If failure in execution.
-
run
Description copied from interface:FlowCallbackInvoked on completion of theFlow.- Specified by:
runin interfaceFlowCallback- Parameters:
escalation- PossibleThrowablefrom theFlow.nullindicates allEscalationinstances handled withinFlow.- Throws:
Throwable-Escalationwithin the callback logic.
-