Class Promise
- java.lang.Object
-
- net.officefloor.frame.impl.execute.function.Promise
-
public class Promise extends java.lang.Object
Provides promise like functionality forFunctionState
instances.- Author:
- Daniel Sagenschneider
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static FunctionState
then(FunctionState function, FunctionState thenFunction)
Execute theFunctionState
then theFunctionState
.
-
-
-
Method Detail
-
then
public static FunctionState then(FunctionState function, FunctionState thenFunction)
Execute the
FunctionState
then theFunctionState
.State is passed between
FunctionState
instances viaManagedObject
instances, so no parameter is provided.- Parameters:
function
-FunctionState
to execute it and its sequence ofFunctionState
instances. May benull
.thenFunction
-FunctionState
to then continue after the first inputFunctionState
sequence completes. May benull
.- Returns:
- Next
FunctionState
to undertake theFunctionState
sequence and then continueFunctionState
sequence. Will returnnull
if both inputs arenull
.
-
-