Interface ManagedObjectContainer
- All Known Implementing Classes:
ManagedObjectContainerImpl
public interface ManagedObjectContainer
Container managing a
ManagedObject.- Author:
- Daniel Sagenschneider
-
Method Summary
Modifier and TypeMethodDescriptionCreates aFunctionStateto check if theManagedObjectcontained within thisManagedObjectContaineris ready.<E> FunctionStateextractExtension(ManagedObjectExtensionExtractor<E> extractor, E[] managedObjectExtensions, int extensionIndex, TeamManagement responsibleTeam) Extracts theManagedObjectextension from theManagedObjectcontained in thisManagedObjectContainer.Obtains the object being managed by theManagedObject.Obtains the object only if available, otherwisenull.Obtains theThreadStateresponsible for changes to thisManagedObjectContainer.loadManagedObject(ManagedFunctionContainer managedFunctionContainer) Creates aFunctionStateto load theManagedObject.Creates aFunctionStateto unload theManagedObject.unregisterGovernance(int governanceIndex) Unregisters theManagedObjectfromGovernance.
-
Method Details
-
getResponsibleThreadState
ThreadState getResponsibleThreadState()Obtains theThreadStateresponsible for changes to thisManagedObjectContainer.- Returns:
ThreadStateresponsible for changes to thisManagedObjectContainer.
-
loadManagedObject
Creates aFunctionStateto load theManagedObject.- Parameters:
managedFunctionContainer-ManagedFunctionContainerrequiring theManagedObject.- Returns:
- Optional
FunctionStateto load theManagedObject. Should this returnnull, theManagedFunctionContainershould not then be executed, as it is expecting to wait. This will return theManagedFunctionContainerwhen theManagedObjectis loaded.
-
checkReady
Creates a
FunctionStateto check if theManagedObjectcontained within thisManagedObjectContaineris ready.Should the
ManagedObjectnot be ready, then will latch to wait for theManagedObjectto be ready.- Parameters:
check-ManagedObjectReadyCheck.- Returns:
FunctionStateto check if theManagedObjectcontained within thisManagedObjectContaineris ready.
-
extractExtension
<E> FunctionState extractExtension(ManagedObjectExtensionExtractor<E> extractor, E[] managedObjectExtensions, int extensionIndex, TeamManagement responsibleTeam) Extracts the
ManagedObjectextension from theManagedObjectcontained in thisManagedObjectContainer.Should the
ManagedObjectnot be loaded, then noManagedObjectextension will be loaded.- Type Parameters:
E- Extension type.- Parameters:
extractor-ManagedObjectExtensionExtractor.managedObjectExtensions-Listto load theManagedObjectextension.extensionIndex- Index within theManagedObjectextensions array to load the extension.responsibleTeam-TeamManagementresponsible for extracting the extension. May benullto use anyTeam.- Returns:
FunctionStateto load theManagedObjectextension.
-
getObject
Object getObject()Obtains the object being managed by theManagedObject.- Returns:
- Object being managed by the
ManagedObject.
-
getOptionalObject
Object getOptionalObject()Obtains the object only if available, otherwisenull.- Returns:
- Object being managed by the
ManagedObjectornullif not yet available. - See Also:
-
unregisterGovernance
Unregisters theManagedObjectfromGovernance.- Parameters:
governanceIndex- Index of theGovernance.- Returns:
FunctionStateto unregister theManagedObjectfromGovernance.
-
unloadManagedObject
FunctionState unloadManagedObject()Creates aFunctionStateto unload theManagedObject.- Returns:
FunctionStateto unload theManagedObject.
-