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
AssetManager implementation.- Author:
- Daniel Sagenschneider
-
Constructor Summary
ConstructorsConstructorDescriptionAssetManagerImpl(ProcessState managingProcess, MonitorClock clock, FunctionLoop loop) Initiate. -
Method Summary
Modifier and TypeMethodDescriptioncreateAssetLatch(Asset asset) Creates a newAssetLatch.execute(FunctionStateContext context) Executes theFunctionState.Obtains theThreadStatefor thisFunctionState.Methods inherited from class net.officefloor.frame.impl.execute.linkedlistset.AbstractLinkedListSetEntry
getNext, getPrev, setNext, setPrevMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.officefloor.frame.internal.structure.FunctionState
cancel, getLinkedListSetOwner, getResponsibleTeam, handleEscalation, isRequireThreadStateSafetyMethods inherited from interface net.officefloor.frame.internal.structure.LinkedListSetEntry
getNext, getPrev, setNext, setPrev
-
Constructor Details
-
AssetManagerImpl
Initiate.- Parameters:
managingProcess-ProcessStatethat is managing thisAssetManager.clock-MonitorClock.loop-FunctionLoop.
-
-
Method Details
-
createAssetLatch
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
Description copied from interface:FunctionStateObtains the
ThreadStatefor thisFunctionState.This provides access to the
ThreadStatethat thisFunctionStateresides within.- Specified by:
getThreadStatein interfaceFunctionState- Returns:
ThreadStatefor thisFunctionState.
-
execute
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:
Throwable- Possible failure ofFunctionStatelogic.
-