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
ThreadsafeCompleteFlowCallback.- 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 voidassertComplete()Asserts theFlowis complete.voidassertNotComplete()Asserts theFlowis not complete.voidrun(java.lang.Throwable escalation)Invoked on completion of theFlow.java.lang.ThreadwaitUntilComplete(int maxWaitTimeInMilliseconds)Waits untilFlowCallbackis complete.-
Methods inherited from class net.officefloor.frame.test.CompleteFlowCallback
assertComplete, assertNotComplete
-
-
-
-
Method Detail
-
waitUntilComplete
public java.lang.Thread waitUntilComplete(int maxWaitTimeInMilliseconds)
Waits untilFlowCallbackis complete.- Parameters:
maxWaitTimeInMilliseconds- Maximum wait time in milliseconds.
-
assertComplete
public void assertComplete() throws java.lang.ExceptionDescription copied from class:CompleteFlowCallbackAsserts theFlowis complete.- Overrides:
assertCompletein classCompleteFlowCallback- Throws:
java.lang.Exception- If failure in execution.
-
assertNotComplete
public void assertNotComplete() throws java.lang.ExceptionDescription copied from class:CompleteFlowCallbackAsserts theFlowis not complete.- Overrides:
assertNotCompletein classCompleteFlowCallback- Throws:
java.lang.Exception- If failure in execution.
-
run
public void run(java.lang.Throwable escalation) throws java.lang.ThrowableDescription copied from interface:FlowCallbackInvoked on completion of theFlow.- Specified by:
runin interfaceFlowCallback- Overrides:
runin classCompleteFlowCallback- Parameters:
escalation- PossibleThrowablefrom theFlow.nullindicates allEscalationinstances handled withinFlow.- Throws:
java.lang.Throwable-Escalationwithin the callback logic.
-
-