Class AssetManagerImpl
- java.lang.Object
-
- net.officefloor.frame.impl.execute.linkedlistset.AbstractLinkedListSetEntry<FunctionState,Flow>
-
- net.officefloor.frame.impl.execute.asset.AssetManagerImpl
-
- All Implemented Interfaces:
AssetManager,FunctionState,LinkedListSetEntry<FunctionState,Flow>
public class AssetManagerImpl extends AbstractLinkedListSetEntry<FunctionState,Flow> implements AssetManager
AssetManagerimplementation.- Author:
- Daniel Sagenschneider
-
-
Constructor Summary
Constructors Constructor Description AssetManagerImpl(ProcessState managingProcess, MonitorClock clock, FunctionLoop loop)Initiate.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AssetLatchcreateAssetLatch(Asset asset)Creates a newAssetLatch.FunctionStateexecute(FunctionStateContext context)Executes theFunctionState.ThreadStategetThreadState()Obtains theThreadStatefor thisFunctionState.-
Methods inherited from class net.officefloor.frame.impl.execute.linkedlistset.AbstractLinkedListSetEntry
getNext, getPrev, setNext, setPrev
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.officefloor.frame.internal.structure.FunctionState
cancel, getLinkedListSetOwner, getResponsibleTeam, handleEscalation, isRequireThreadStateSafety
-
Methods inherited from interface net.officefloor.frame.internal.structure.LinkedListSetEntry
getNext, getPrev, setNext, setPrev
-
-
-
-
Constructor Detail
-
AssetManagerImpl
public AssetManagerImpl(ProcessState managingProcess, MonitorClock clock, FunctionLoop loop)
Initiate.- Parameters:
managingProcess-ProcessStatethat is managing thisAssetManager.clock-MonitorClock.loop-FunctionLoop.
-
-
Method Detail
-
createAssetLatch
public AssetLatch createAssetLatch(Asset asset)
Description copied from interface:AssetManagerCreates a new
AssetLatch.The returned
AssetLatchis not being managed by thisAssetManager. To have theAssetLatchmanaged, it must be registered with thisAssetManager. This allows for only the list ofAssetLatchinstances requiring management to be managed.- Specified by:
createAssetLatchin interfaceAssetManager- Parameters:
asset-AssetthatFunctionStateinstances will wait on.- Returns:
AssetLatchfor theAsset.
-
getThreadState
public ThreadState getThreadState()
Description copied from interface:FunctionStateObtains the
ThreadStatefor thisFunctionState.This provides access to the
ThreadStatethat thisFunctionStateresides within.- Specified by:
getThreadStatein interfaceFunctionState- Returns:
ThreadStatefor thisFunctionState.
-
execute
public FunctionState execute(FunctionStateContext context) throws java.lang.Throwable
Description copied from interface:FunctionStateExecutes theFunctionState.- Specified by:
executein interfaceFunctionState- Parameters:
context-FunctionStateContextfor executing theFunctionState.- Returns:
- Next
FunctionStateto be executed. May benullto indicate no furtherFunctionStateinstances to execute. - Throws:
java.lang.Throwable- Possible failure ofFunctionStatelogic.
-
-