Interface ThreadStateContext
-
public interface ThreadStateContext
Context for executing aThreadState
.- Author:
- Daniel Sagenschneider
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description FunctionState
createFunction(FunctionLogic logic, ThreadState fallbackThreadState)
FunctionState
executeFunction(FunctionState function)
Executes theFunctionState
returning the nextFunctionState
to execute.void
flagRequiresThreadStateSafety()
Flag theThreadState
requiresThread
safety.ManagedObjectContainer
getManagedObject(ManagedObjectIndex index)
Obtains theManagedObjectContainer
for theManagedObjectIndex
.boolean
isRequireThreadStateSafety()
Indicates if theThreadState
requiresThread
safety.
-
-
-
Method Detail
-
isRequireThreadStateSafety
boolean isRequireThreadStateSafety()
Indicates if theThreadState
requiresThread
safety.- Returns:
true
ifThreadState
requiresThread
safety.
-
flagRequiresThreadStateSafety
void flagRequiresThreadStateSafety()
Flag theThreadState
requiresThread
safety.
-
createFunction
FunctionState createFunction(FunctionLogic logic, ThreadState fallbackThreadState)
- Parameters:
logic
-FunctionLogic
.fallbackThreadState
- Fall backThreadState
should there be no currentThreadState
.- Returns:
FunctionState
for theFunctionLogic
.
-
executeFunction
FunctionState executeFunction(FunctionState function) throws java.lang.Throwable
Executes theFunctionState
returning the nextFunctionState
to execute.- Parameters:
function
-FunctionState
to be executed.- Returns:
- Next
FunctionState
to be executed. May benull
. - Throws:
java.lang.Throwable
- Possible failure in executing theFunctionState
.
-
getManagedObject
ManagedObjectContainer getManagedObject(ManagedObjectIndex index)
Obtains theManagedObjectContainer
for theManagedObjectIndex
.- Parameters:
index
-ManagedObjectIndex
.- Returns:
ManagedObjectContainer
. May benull
if not yet instantiated.
-
-