Interface FunctionLogic
-
- All Known Implementing Classes:
SpawnThreadFunctionLogic,SynchroniseProcessStateFunctionLogic
public interface FunctionLogicEncapsulates simple logic for aFunctionState.- Author:
- Daniel Sagenschneider
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description FunctionStateexecute(Flow flow)Executes the logic.default TeamManagementgetResponsibleTeam()Obtains the responsibleTeamManagementfor thisFunctionLogic.default booleanisRequireThreadStateSafety()Indicates if theFunctionLogicrequiresThreadStatesafety.
-
-
-
Method Detail
-
getResponsibleTeam
default TeamManagement getResponsibleTeam()
Obtains the responsibleTeamManagementfor thisFunctionLogic.- Returns:
TeamManagementresponsible for thisFunctionLogic. May benullto use anyTeam.
-
isRequireThreadStateSafety
default boolean isRequireThreadStateSafety()
Indicates if theFunctionLogicrequiresThreadStatesafety.- Returns:
trueshouldFunctionLogicrequireThreadStatesafety.
-
execute
FunctionState execute(Flow flow) throws java.lang.Throwable
Executes the logic.- Parameters:
flow-Flowthat contains thisFunctionLogic.- Returns:
- Optional
FunctionStateto execute next. - Throws:
java.lang.Throwable- If logic fails.
-
-