Interface FunctionFlowContext<F extends java.lang.Enum<F>>
-
- All Known Subinterfaces:
AdministrationContext<E,F,G>
,GovernanceContext<F>
,ManagedFunctionContext<O,F>
public interface FunctionFlowContext<F extends java.lang.Enum<F>>
Context for theFlow
instances from theManagedFunctionLogic
.- Author:
- Daniel Sagenschneider
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description AsynchronousFlow
createAsynchronousFlow()
Creates anAsynchronousFlow
that must be completed before any furtherFlow
is executed.void
doFlow(int flowIndex, java.lang.Object parameter, FlowCallback callback)
Similar todoFlow(Enum, Object, FlowCallback)
except that allows dynamic instigation ofFlow
instances.void
doFlow(F key, java.lang.Object parameter, FlowCallback callback)
Instigates aFlow
to be run from theManagedFunctionLogic
.java.util.concurrent.Executor
getExecutor()
Obtains theExecutor
to run on anotherThread
.java.util.logging.Logger
getLogger()
Obtains theLogger
.
-
-
-
Method Detail
-
getLogger
java.util.logging.Logger getLogger()
Obtains theLogger
.- Returns:
Logger
.
-
doFlow
void doFlow(F key, java.lang.Object parameter, FlowCallback callback)
Instigates aFlow
to be run from theManagedFunctionLogic
.- Parameters:
key
- Key identifying theFlow
to instigate.parameter
- Parameter for the firstManagedFunction
of theFlow
.callback
- OptionalFlowCallback
. May benull
.
-
doFlow
void doFlow(int flowIndex, java.lang.Object parameter, FlowCallback callback)
Similar to
doFlow(Enum, Object, FlowCallback)
except that allows dynamic instigation ofFlow
instances.In other words, an
Enum
is not required to define the possibleFlow
instances available.- Parameters:
flowIndex
- Index identifying theFlow
to instigate.parameter
- Parameter for the firstManagedFunction
of theFlow
.callback
- OptionalFlowCallback
. May benull
.
-
createAsynchronousFlow
AsynchronousFlow createAsynchronousFlow()
Creates anAsynchronousFlow
that must be completed before any furtherFlow
is executed.- Returns:
AsynchronousFlow
that must be completed.
-
getExecutor
java.util.concurrent.Executor getExecutor()
Obtains the
Executor
to run on anotherThread
.Runnable
instances provided to thisExecutor
will always be executed on anotherThread
. This allows breaking thread stack execution.Note that the returned
Executor
is a singleton perOfficeFloor
. Therefore, be careful to not tie up all itsThread
instances with blocking / long runningRunnable
instances. Preference should be to useManagedFunction
instances where appropriateThread
injection can manage execution.- Returns:
Executor
to runRunnable
on anotherThread
.
-
-