Interface SupplierNode
-
- All Superinterfaces:
Node,OfficeFloorSupplier,OfficeSupplier,PropertyConfigurable
- All Known Implementing Classes:
SupplierNodeImpl
public interface SupplierNode extends Node, OfficeFloorSupplier, OfficeSupplier
SupplierNode.- Author:
- Daniel Sagenschneider
-
-
Method Summary
-
Methods inherited from interface net.officefloor.compile.internal.structure.Node
getChildNodes, getLocation, getNodeName, getNodeType, getParentNode, getQualifiedName, getQualifiedName, isInitialised
-
Methods inherited from interface net.officefloor.compile.spi.officefloor.OfficeFloorSupplier
getOfficeFloorManagedObjectSource, getOfficeFloorSupplierName, getOfficeFloorSupplierThreadLocal
-
Methods inherited from interface net.officefloor.compile.spi.office.OfficeSupplier
getOfficeManagedObjectSource, getOfficeSupplierName, getOfficeSupplierThreadLocal
-
Methods inherited from interface net.officefloor.compile.properties.PropertyConfigurable
addProperty
-
-
-
-
Field Detail
-
TYPE
static final java.lang.String TYPE
Nodetype.- See Also:
- Constant Field Values
-
-
Method Detail
-
initialise
void initialise(java.lang.String supplierSourceClassName, SupplierSource supplierSource)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
InitialSupplierType loadInitialSupplierType(boolean isLoadingType)
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
void registerAsPossibleMBean(CompileContext compileContext)
Registers as a possible MBean.- Parameters:
compileContext-CompileContext.
-
sourceSupplier
boolean sourceSupplier(CompileContext compileContext)
Sources theSupplierThreadLocalinstances.- Parameters:
compileContext-CompileContext.- Returns:
trueif successfully sourced theSupplierSource.falseif failed to source, with issues reported to theCompilerIssues.
-
sourceComplete
boolean sourceComplete(CompileContext compileContext)
Flags sourcing functionality complete.- Parameters:
compileContext-CompileContext.- Returns:
trueif successfully handle completing sourcing.falseif failed to source, with issues reported to theCompilerIssues.
-
ensureNoThreadLocals
boolean ensureNoThreadLocals(CompileContext compileContext)
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
void buildSupplier(OfficeBuilder officeBuilder, CompileContext compileContext)
Builds theSupplierThreadLocalinstances for theSupplierSource.- Parameters:
officeBuilder-OfficeBuilderto build the required thread handling.compileContext-CompileContext.
-
getInternalSuppliers
InternalSupplier[] getInternalSuppliers()
Obtains theInternalSupplierinstances.- Returns:
InternalSupplierinstances.
-
-