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
Node
type.- See Also:
- Constant Field Values
-
-
Method Detail
-
initialise
void initialise(java.lang.String supplierSourceClassName, SupplierSource supplierSource)
Initialises theSupplierNode
.- Parameters:
supplierSourceClassName
-Class
name of theSupplierSource
.supplierSource
- Optional instantiatedSupplierSource
. May benull
.
-
getOfficeNode
OfficeNode getOfficeNode()
Obtains the parentOfficeNode
.- Returns:
- Parent
OfficeNode
ornull
if configured at theOfficeFloor
level.
-
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
-AvailableType
instances.- Returns:
SupplierType
.
-
registerAsPossibleMBean
void registerAsPossibleMBean(CompileContext compileContext)
Registers as a possible MBean.- Parameters:
compileContext
-CompileContext
.
-
sourceSupplier
boolean sourceSupplier(CompileContext compileContext)
Sources theSupplierThreadLocal
instances.- Parameters:
compileContext
-CompileContext
.- Returns:
true
if successfully sourced theSupplierSource
.false
if failed to source, with issues reported to theCompilerIssues
.
-
sourceComplete
boolean sourceComplete(CompileContext compileContext)
Flags sourcing functionality complete.- Parameters:
compileContext
-CompileContext
.- Returns:
true
if successfully handle completing sourcing.false
if failed to source, with issues reported to theCompilerIssues
.
-
ensureNoThreadLocals
boolean ensureNoThreadLocals(CompileContext compileContext)
Ensures there are no
SupplierThreadLocalNode
andThreadSynchroniserFactory
instances.SupplierThreadLocal
andThreadSynchroniserFactory
instances are only applicable within theOffice
(application). IfSupplierSource
is used at theOfficeFloor
, then it can only supplyManagedObjectSource
instances and not depend onSupplierThreadLocal
norThreadSynchroniserFactory
instances.If
SupplierThreadLocal
orThreadSynchroniserFactory
instances then they are raised viaCompilerIssues
.- Parameters:
compileContext
-CompileContext
.- Returns:
true
if noSupplierThreadLocal
norThreadSynchroniserFactory
instances.
-
loadAutoWireObjects
void loadAutoWireObjects(AutoWirer<LinkObjectNode> autoWirer, ManagedObjectSourceVisitor managedObjectSourceVisitor, CompileContext compileContext)
Loads theSuppliedManagedObjectSourceNode
instances asManagedObjectNode
instances to theAutoWirer
.- Parameters:
autoWirer
-AutoWirer
.managedObjectSourceVisitor
-ManagedObjectSourceVisitor
.compileContext
-CompileContext
.
-
loadAutoWireExtensions
void loadAutoWireExtensions(AutoWirer<ManagedObjectExtensionNode> autoWirer, ManagedObjectSourceVisitor managedObjectSourceVisitor, CompileContext compileContext)
Loads theSuppliedManagedObjectSourceNode
instances asManagedObjectExtensionNode
instances to theAutoWirer
.- Parameters:
autoWirer
-AutoWirer
.managedObjectSourceVisitor
-ManagedObjectSourceVisitor
.compileContext
-CompileContext
.
-
autoWireObjects
void autoWireObjects(AutoWirer<LinkObjectNode> autoWirer, OfficeNode office, CompileContext compileContext)
Auto-wires theSupplierThreadLocalNode
instances that are unlinked.- Parameters:
autoWirer
-AutoWirer
.office
-OfficeNode
requiring the auto-wiring.compileContext
-CompileContext
.
-
buildSupplier
void buildSupplier(OfficeBuilder officeBuilder, CompileContext compileContext)
Builds theSupplierThreadLocal
instances for theSupplierSource
.- Parameters:
officeBuilder
-OfficeBuilder
to build the required thread handling.compileContext
-CompileContext
.
-
getInternalSuppliers
InternalSupplier[] getInternalSuppliers()
Obtains theInternalSupplier
instances.- Returns:
InternalSupplier
instances.
-
-