Interface Flow
- All Superinterfaces:
LinkedListSetEntry<Flow,ThreadState>
- All Known Implementing Classes:
FlowImpl
Represents a sub-graph of the
ManagedFunctionContainer graph making
up the ThreadState. This enables knowing when to undertake the
FlowCallback on completion of all ManagedFunctionContainer
instances of the Flow.- Author:
- Daniel Sagenschneider
-
Method Summary
Modifier and TypeMethodDescriptioncancel()Cancels thisFlow.<E,F extends Enum<F>, G extends Enum<G>>
ManagedFunctionContainercreateAdministrationFunction(ManagedObjectAdministrationMetaData<E, F, G> adminMetaData, ManagedFunctionContainer parallelFunctionOwner) Creates a newManagedFunctionContainercontained in thisFlowfor theManagedObjectAdministrationMetaData.createFunction(FunctionLogic logic) <F extends Enum<F>>
ManagedFunctionContainercreateGovernanceFunction(GovernanceActivity<F> governanceActivity, GovernanceMetaData<?, F> governanceMetaData) <O extends Enum<O>,F extends Enum<F>>
ManagedFunctionContainercreateManagedFunction(Object parameter, ManagedFunctionMetaData<O, F> managedFunctionMetaData, boolean isEnforceGovernance, BlockState parallelFunctionOwner) Obtains theThreadStatecontaining thisFlow.managedFunctionComplete(FunctionState function, Throwable functionEscalation, EscalationCompletion escalationCompletion) Flags that the inputFunctionStatehas completed.Methods inherited from interface net.officefloor.frame.internal.structure.LinkedListSetEntry
getLinkedListSetOwner, getNext, getPrev, setNext, setPrev
-
Method Details
-
createFunction
- Parameters:
logic-FunctionLogic.- Returns:
FunctionStatefor theFunctionLogic.
-
createManagedFunction
<O extends Enum<O>,F extends Enum<F>> ManagedFunctionContainer createManagedFunction(Object parameter, ManagedFunctionMetaData<O, F> managedFunctionMetaData, boolean isEnforceGovernance, BlockState parallelFunctionOwner) - Type Parameters:
O- Dependency key type.F-Flowkey type.- Parameters:
parameter- Parameter for theManagedFunction.managedFunctionMetaData-ManagedFunctionMetaDatafor the newManagedFunction.isEnforceGovernance-trueto enforceGovernanceon deactivation.parallelFunctionOwner-BlockStatethat is the parallel owner of the newManagedFunction.- Returns:
- New
ManagedFunctionContainer.
-
createGovernanceFunction
<F extends Enum<F>> ManagedFunctionContainer createGovernanceFunction(GovernanceActivity<F> governanceActivity, GovernanceMetaData<?, F> governanceMetaData) - Type Parameters:
F-Flowkey type.- Parameters:
governanceActivity-GovernanceActivity.governanceMetaData-GovernanceMetaData.- Returns:
- New
ManagedFunctionContainer.
-
createAdministrationFunction
<E,F extends Enum<F>, ManagedFunctionContainer createAdministrationFunctionG extends Enum<G>> (ManagedObjectAdministrationMetaData<E, F, G> adminMetaData, ManagedFunctionContainer parallelFunctionOwner) Creates a newManagedFunctionContainercontained in thisFlowfor theManagedObjectAdministrationMetaData.- Type Parameters:
E- Extension type.F-Flowkey type.G-Governancekey type.- Parameters:
adminMetaData-ManagedObjectAdministrationMetaData.parallelFunctionOwner-ManagedFunctionContainerthat is the parallel owner of the newManagedFunction.- Returns:
- New
ManagedFunctionContainer.
-
managedFunctionComplete
FunctionState managedFunctionComplete(FunctionState function, Throwable functionEscalation, EscalationCompletion escalationCompletion) Flags that the inputFunctionStatehas completed.- Parameters:
function-FunctionStatethat has completed.functionEscalation- PossibleEscalationfrom theFunctionState. May benull.escalationCompletion- PossibleEscalationCompletion. May benull.- Returns:
- Optional
FunctionStateto handle completion of theFunctionState.
-
cancel
FunctionState cancel()Cancels thisFlow.- Returns:
FunctionStateto clean up thisFlow.
-
getThreadState
ThreadState getThreadState()Obtains theThreadStatecontaining thisFlow.- Returns:
ThreadStatecontaining thisFlow.
-