Interface SupplierNode
- All Superinterfaces:
Node,OfficeFloorSupplier,OfficeSupplier,PropertyConfigurable
- All Known Implementing Classes:
SupplierNodeImpl
Supplier
Node.- Author:
- Daniel Sagenschneider
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoidautoWireObjects(AutoWirer<LinkObjectNode> autoWirer, OfficeNode office, CompileContext compileContext) Auto-wires theSupplierThreadLocalNodeinstances that are unlinked.voidbuildSupplier(OfficeBuilder officeBuilder, CompileContext compileContext) Builds theSupplierThreadLocalinstances for theSupplierSource.booleanensureNoThreadLocals(CompileContext compileContext) Ensures there are noSupplierThreadLocalNodeandThreadSynchroniserFactoryinstances.Obtains theInternalSupplierinstances.Obtains the parentOfficeFloorNode.Obtains the parentOfficeNode.voidinitialise(String supplierSourceClassName, SupplierSource supplierSource) Initialises theSupplierNode.voidloadAutoWireExtensions(AutoWirer<ManagedObjectExtensionNode> autoWirer, ManagedObjectSourceVisitor managedObjectSourceVisitor, CompileContext compileContext) Loads theSuppliedManagedObjectSourceNodeinstances asManagedObjectExtensionNodeinstances to theAutoWirer.voidloadAutoWireObjects(AutoWirer<LinkObjectNode> autoWirer, ManagedObjectSourceVisitor managedObjectSourceVisitor, CompileContext compileContext) Loads theSuppliedManagedObjectSourceNodeinstances asManagedObjectNodeinstances to theAutoWirer.loadInitialSupplierType(boolean isLoadingType) Loads theInitialSupplierType.loadSupplierType(CompileContext compileContext, boolean isLoadingType, AvailableType[] availableTypes) Loads theSupplierType.voidregisterAsPossibleMBean(CompileContext compileContext) Registers as a possible MBean.booleansourceComplete(CompileContext compileContext) Flags sourcing functionality complete.booleansourceSupplier(CompileContext compileContext) Sources theSupplierThreadLocalinstances.Methods inherited from interface net.officefloor.compile.internal.structure.Node
getChildNodes, getLocation, getNodeName, getNodeType, getParentNode, getQualifiedName, getQualifiedName, isInitialisedMethods inherited from interface net.officefloor.compile.spi.officefloor.OfficeFloorSupplier
getOfficeFloorManagedObjectSource, getOfficeFloorSupplierName, getOfficeFloorSupplierThreadLocalMethods inherited from interface net.officefloor.compile.spi.office.OfficeSupplier
getOfficeManagedObjectSource, getOfficeSupplierName, getOfficeSupplierThreadLocalMethods inherited from interface net.officefloor.compile.properties.PropertyConfigurable
addProperty
-
Field Details
-
TYPE
Nodetype.- See Also:
-
-
Method Details
-
initialise
Initialises theSupplierNode.- Parameters:
supplierSourceClassName-Classname of theSupplierSource.supplierSource- Optional instantiatedSupplierSource. May benull.
-
getOfficeNode
OfficeNode getOfficeNode()Obtains the parentOfficeNode.- Returns:
- Parent
OfficeNodeornullif configured at theOfficeFloorlevel.
-
getOfficeFloorNode
OfficeFloorNode getOfficeFloorNode()Obtains the parentOfficeFloorNode.- Returns:
- Parent
OfficeFloorNode.
-
loadInitialSupplierType
Loads theInitialSupplierType.- Parameters:
isLoadingType- Indicates if using to load type.- Returns:
InitialSupplierType.
-
loadSupplierType
SupplierType loadSupplierType(CompileContext compileContext, boolean isLoadingType, AvailableType[] availableTypes) Loads theSupplierType.- Parameters:
compileContext-CompileContext.isLoadingType- Indicates if using to load type.availableTypes-AvailableTypeinstances.- Returns:
SupplierType.
-
registerAsPossibleMBean
Registers as a possible MBean.- Parameters:
compileContext-CompileContext.
-
sourceSupplier
Sources theSupplierThreadLocalinstances.- Parameters:
compileContext-CompileContext.- Returns:
trueif successfully sourced theSupplierSource.falseif failed to source, with issues reported to theCompilerIssues.
-
sourceComplete
Flags sourcing functionality complete.- Parameters:
compileContext-CompileContext.- Returns:
trueif successfully handle completing sourcing.falseif failed to source, with issues reported to theCompilerIssues.
-
ensureNoThreadLocals
Ensures there are no
SupplierThreadLocalNodeandThreadSynchroniserFactoryinstances.SupplierThreadLocalandThreadSynchroniserFactoryinstances are only applicable within theOffice(application). IfSupplierSourceis used at theOfficeFloor, then it can only supplyManagedObjectSourceinstances and not depend onSupplierThreadLocalnorThreadSynchroniserFactoryinstances.If
SupplierThreadLocalorThreadSynchroniserFactoryinstances then they are raised viaCompilerIssues.- Parameters:
compileContext-CompileContext.- Returns:
trueif noSupplierThreadLocalnorThreadSynchroniserFactoryinstances.
-
loadAutoWireObjects
void loadAutoWireObjects(AutoWirer<LinkObjectNode> autoWirer, ManagedObjectSourceVisitor managedObjectSourceVisitor, CompileContext compileContext) Loads theSuppliedManagedObjectSourceNodeinstances asManagedObjectNodeinstances to theAutoWirer.- Parameters:
autoWirer-AutoWirer.managedObjectSourceVisitor-ManagedObjectSourceVisitor.compileContext-CompileContext.
-
loadAutoWireExtensions
void loadAutoWireExtensions(AutoWirer<ManagedObjectExtensionNode> autoWirer, ManagedObjectSourceVisitor managedObjectSourceVisitor, CompileContext compileContext) Loads theSuppliedManagedObjectSourceNodeinstances asManagedObjectExtensionNodeinstances to theAutoWirer.- Parameters:
autoWirer-AutoWirer.managedObjectSourceVisitor-ManagedObjectSourceVisitor.compileContext-CompileContext.
-
autoWireObjects
void autoWireObjects(AutoWirer<LinkObjectNode> autoWirer, OfficeNode office, CompileContext compileContext) Auto-wires theSupplierThreadLocalNodeinstances that are unlinked.- Parameters:
autoWirer-AutoWirer.office-OfficeNoderequiring the auto-wiring.compileContext-CompileContext.
-
buildSupplier
Builds theSupplierThreadLocalinstances for theSupplierSource.- Parameters:
officeBuilder-OfficeBuilderto build the required thread handling.compileContext-CompileContext.
-
getInternalSuppliers
InternalSupplier[] getInternalSuppliers()Obtains theInternalSupplierinstances.- Returns:
InternalSupplierinstances.
-