Interface FunctionLogic
-
- All Known Implementing Classes:
SpawnThreadFunctionLogic
,SynchroniseProcessStateFunctionLogic
public interface FunctionLogic
Encapsulates simple logic for aFunctionState
.- Author:
- Daniel Sagenschneider
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description FunctionState
execute(Flow flow)
Executes the logic.default TeamManagement
getResponsibleTeam()
Obtains the responsibleTeamManagement
for thisFunctionLogic
.default boolean
isRequireThreadStateSafety()
Indicates if theFunctionLogic
requiresThreadState
safety.
-
-
-
Method Detail
-
getResponsibleTeam
default TeamManagement getResponsibleTeam()
Obtains the responsibleTeamManagement
for thisFunctionLogic
.- Returns:
TeamManagement
responsible for thisFunctionLogic
. May benull
to use anyTeam
.
-
isRequireThreadStateSafety
default boolean isRequireThreadStateSafety()
Indicates if theFunctionLogic
requiresThreadState
safety.- Returns:
true
shouldFunctionLogic
requireThreadState
safety.
-
execute
FunctionState execute(Flow flow) throws java.lang.Throwable
Executes the logic.- Parameters:
flow
-Flow
that contains thisFunctionLogic
.- Returns:
- Optional
FunctionState
to execute next. - Throws:
java.lang.Throwable
- If logic fails.
-
-