Package net.officefloor.frame.test
Class SafeCompleteFlowCallback
- java.lang.Object
-
- net.officefloor.frame.test.CompleteFlowCallback
-
- net.officefloor.frame.test.SafeCompleteFlowCallback
-
- All Implemented Interfaces:
FlowCallback
public class SafeCompleteFlowCallback extends CompleteFlowCallback
Thread
safeCompleteFlowCallback
.- Author:
- Daniel Sagenschneider
-
-
Field Summary
-
Fields inherited from class net.officefloor.frame.test.CompleteFlowCallback
isComplete
-
Fields inherited from interface net.officefloor.frame.api.function.FlowCallback
ESCALATE
-
-
Constructor Summary
Constructors Constructor Description SafeCompleteFlowCallback()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
assertComplete()
Asserts theFlow
is complete.void
assertNotComplete()
Asserts theFlow
is not complete.void
run(java.lang.Throwable escalation)
Invoked on completion of theFlow
.java.lang.Thread
waitUntilComplete(int maxWaitTimeInMilliseconds)
Waits untilFlowCallback
is complete.-
Methods inherited from class net.officefloor.frame.test.CompleteFlowCallback
assertComplete, assertNotComplete
-
-
-
-
Method Detail
-
waitUntilComplete
public java.lang.Thread waitUntilComplete(int maxWaitTimeInMilliseconds)
Waits untilFlowCallback
is complete.- Parameters:
maxWaitTimeInMilliseconds
- Maximum wait time in milliseconds.
-
assertComplete
public void assertComplete() throws java.lang.Exception
Description copied from class:CompleteFlowCallback
Asserts theFlow
is complete.- Overrides:
assertComplete
in classCompleteFlowCallback
- Throws:
java.lang.Exception
- If failure in execution.
-
assertNotComplete
public void assertNotComplete() throws java.lang.Exception
Description copied from class:CompleteFlowCallback
Asserts theFlow
is not complete.- Overrides:
assertNotComplete
in classCompleteFlowCallback
- Throws:
java.lang.Exception
- If failure in execution.
-
run
public void run(java.lang.Throwable escalation) throws java.lang.Throwable
Description copied from interface:FlowCallback
Invoked on completion of theFlow
.- Specified by:
run
in interfaceFlowCallback
- Overrides:
run
in classCompleteFlowCallback
- Parameters:
escalation
- PossibleThrowable
from theFlow
.null
indicates allEscalation
instances handled withinFlow
.- Throws:
java.lang.Throwable
-Escalation
within the callback logic.
-
-