Package net.officefloor.frame.test
Class SafeCompleteFlowCallback
java.lang.Object
net.officefloor.frame.test.CompleteFlowCallback
net.officefloor.frame.test.SafeCompleteFlowCallback
- All Implemented Interfaces:
FlowCallback
Thread safe CompleteFlowCallback.- Author:
- Daniel Sagenschneider
-
Field Summary
Fields inherited from class net.officefloor.frame.test.CompleteFlowCallback
isCompleteFields inherited from interface net.officefloor.frame.api.function.FlowCallback
ESCALATE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAsserts theFlowis complete.voidAsserts theFlowis not complete.voidInvoked on completion of theFlow.waitUntilComplete(int maxWaitTimeInMilliseconds) Waits untilFlowCallbackis complete.Methods inherited from class net.officefloor.frame.test.CompleteFlowCallback
assertComplete, assertNotComplete
-
Constructor Details
-
SafeCompleteFlowCallback
public SafeCompleteFlowCallback()
-
-
Method Details
-
waitUntilComplete
Waits untilFlowCallbackis complete.- Parameters:
maxWaitTimeInMilliseconds- Maximum wait time in milliseconds.- Returns:
Threadthat completed theFlowCallback.
-
assertComplete
Description copied from class:CompleteFlowCallbackAsserts theFlowis complete.- Overrides:
assertCompletein classCompleteFlowCallback- Throws:
Exception- If failure in execution.
-
assertNotComplete
Description copied from class:CompleteFlowCallbackAsserts theFlowis not complete.- Overrides:
assertNotCompletein classCompleteFlowCallback- Throws:
Exception- If failure in execution.
-
run
Description copied from interface:FlowCallbackInvoked on completion of theFlow.- Specified by:
runin interfaceFlowCallback- Overrides:
runin classCompleteFlowCallback- Parameters:
escalation- PossibleThrowablefrom theFlow.nullindicates allEscalationinstances handled withinFlow.- Throws:
Throwable-Escalationwithin the callback logic.
-