Interface FunctionFlowContext<F extends Enum<F>>
- All Known Subinterfaces:
AdministrationContext<E,,F, G> GovernanceContext<F>,ManagedFunctionContext<O,F>
public interface FunctionFlowContext<F extends Enum<F>>
Context for the
Flow instances from the ManagedFunctionLogic.- Author:
- Daniel Sagenschneider
-
Method Summary
Modifier and TypeMethodDescriptionCreates anAsynchronousFlowthat must be completed before any furtherFlowis executed.voiddoFlow(int flowIndex, Object parameter, FlowCallback callback) Similar todoFlow(Enum, Object, FlowCallback)except that allows dynamic instigation ofFlowinstances.voiddoFlow(F key, Object parameter, FlowCallback callback) Instigates aFlowto be run from theManagedFunctionLogic.Obtains theLogger.
-
Method Details
-
getLogger
Logger getLogger()Obtains theLogger.- Returns:
Logger.
-
doFlow
Instigates aFlowto be run from theManagedFunctionLogic.- Parameters:
key- Key identifying theFlowto instigate.parameter- Parameter for the firstManagedFunctionof theFlow.callback- OptionalFlowCallback. May benull.
-
doFlow
Similar to
doFlow(Enum, Object, FlowCallback)except that allows dynamic instigation ofFlowinstances.In other words, an
Enumis not required to define the possibleFlowinstances available.- Parameters:
flowIndex- Index identifying theFlowto instigate.parameter- Parameter for the firstManagedFunctionof theFlow.callback- OptionalFlowCallback. May benull.
-
createAsynchronousFlow
AsynchronousFlow createAsynchronousFlow()Creates anAsynchronousFlowthat must be completed before any furtherFlowis executed.- Returns:
AsynchronousFlowthat must be completed.
-
getExecutor
Executor getExecutor()Obtains the
Executorto run on anotherThread.Runnableinstances provided to thisExecutorwill always be executed on anotherThread. This allows breaking thread stack execution.Note that the returned
Executoris a singleton perOfficeFloor. Therefore, be careful to not tie up all itsThreadinstances with blocking / long runningRunnableinstances. Preference should be to useManagedFunctioninstances where appropriateThreadinjection can manage execution.
-