Class SupplierSourceContextImpl
java.lang.Object
net.officefloor.frame.impl.construct.source.SourcePropertiesImpl
net.officefloor.frame.impl.construct.source.SourceContextImpl
net.officefloor.compile.impl.supplier.SupplierSourceContextImpl
- All Implemented Interfaces:
SupplierCompileConfiguration,SupplierCompileContext,SupplierCompletionContext,SupplierSourceContext,ServiceContext,SourceContext,SourceProperties
public class SupplierSourceContextImpl
extends SourceContextImpl
implements SupplierSourceContext, SupplierCompletionContext, SupplierCompileConfiguration
SupplierSourceContext implementation.- Author:
- Daniel Sagenschneider
-
Constructor Summary
ConstructorsConstructorDescriptionSupplierSourceContextImpl(String supplierSourceName, boolean isLoadingType, String[] additionalProfiles, PropertyList propertyList, NodeContext context) Initiate. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddCompileCompletion(SupplierCompileCompletion completion) Adds aSupplierCompileCompletionto be invoked after compilation of respectiveOfficeFloor/Officefunctionality.voidaddInternalSupplier(InternalSupplier internalSupplier) Adds anInternalSupplier.<D extends Enum<D>,F extends Enum<F>>
SuppliedManagedObjectSourceaddManagedObjectSource(String qualifier, Class<?> type, ManagedObjectSource<D, F> managedObjectSource) Adds a potentialManagedObjectSourcefor dependency injection.<T> SupplierThreadLocal<T>addSupplierThreadLocal(String qualifier, Class<? extends T> type) Adds aSupplierThreadLocal.voidaddThreadSynchroniser(ThreadSynchroniserFactory threadSynchroniserFactory) Adds aThreadSynchroniser.Obtains theAvailableTypeinstances.Obtains theSupplierCompileCompletioninstances.Obtains theInternalSupplierinstances.Obtains theSuppliedManagedObjectSourceTypeinstances.Obtains theSupplierThreadLocalTypeinstances.Obtains theThreadSynchroniserFactoryinstances.Methods inherited from class net.officefloor.frame.impl.construct.source.SourceContextImpl
getClassLoader, getClock, getLogger, getName, getOptionalResource, getProfiles, getResource, isLoadingType, loadClass, loadOptionalClass, loadOptionalService, loadOptionalServices, loadService, loadService, loadServicesMethods inherited from class net.officefloor.frame.impl.construct.source.SourcePropertiesImpl
addProperty, getProperties, getProperty, getProperty, getPropertyNamesMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.officefloor.frame.api.source.SourceContext
getClassLoader, getClock, getLogger, getName, getOptionalResource, getProfiles, getResource, isLoadingType, loadClass, loadOptionalClass, loadOptionalService, loadOptionalServices, loadService, loadService, loadServicesMethods inherited from interface net.officefloor.frame.api.source.SourceProperties
getProperties, getProperty, getProperty, getPropertyNames
-
Constructor Details
-
SupplierSourceContextImpl
public SupplierSourceContextImpl(String supplierSourceName, boolean isLoadingType, String[] additionalProfiles, PropertyList propertyList, NodeContext context) Initiate.- Parameters:
supplierSourceName- Name of theSupplierSource.isLoadingType- Indicates if loading type.additionalProfiles- Additional profiles.propertyList-PropertyList.context-NodeContext.
-
-
Method Details
-
getSupplierThreadLocalTypes
Description copied from interface:SupplierCompileConfigurationObtains theSupplierThreadLocalTypeinstances.- Specified by:
getSupplierThreadLocalTypesin interfaceSupplierCompileConfiguration- Returns:
SupplierThreadLocalTypeinstances.
-
getThreadSynchronisers
Description copied from interface:SupplierCompileConfigurationObtains theThreadSynchroniserFactoryinstances.- Specified by:
getThreadSynchronisersin interfaceSupplierCompileConfiguration- Returns:
ThreadSynchroniserFactoryinstances.
-
getSuppliedManagedObjectSourceTypes
Description copied from interface:SupplierCompileConfigurationObtains theSuppliedManagedObjectSourceTypeinstances.- Specified by:
getSuppliedManagedObjectSourceTypesin interfaceSupplierCompileConfiguration- Returns:
SuppliedManagedObjectSourceTypeinstances.
-
getInternalSuppliers
Description copied from interface:SupplierCompileConfigurationObtains theInternalSupplierinstances.- Specified by:
getInternalSuppliersin interfaceSupplierCompileConfiguration- Returns:
InternalSupplierinstances.
-
getCompileCompletions
Description copied from interface:SupplierCompileConfigurationObtains theSupplierCompileCompletioninstances.- Specified by:
getCompileCompletionsin interfaceSupplierCompileConfiguration- Returns:
SupplierCompileCompletioninstances.
-
addSupplierThreadLocal
Description copied from interface:SupplierCompileContextAdds a
SupplierThreadLocal.This allows integrating third party libraries that require
ThreadLocalaccess to objects.- Specified by:
addSupplierThreadLocalin interfaceSupplierCompileContext- Type Parameters:
T- Type of object to be returned from theSupplierThreadLocal.- Parameters:
qualifier- Qualifier for theAutoWire. May benullto match only on type.type- Type forAutoWire.- Returns:
SupplierThreadLocalto obtain the object.
-
addThreadSynchroniser
Description copied from interface:SupplierCompileContextAdds a
ThreadSynchroniser.This enables keeping the
ThreadLocalinstances of the integrating third party library consistent across theThreadinstances.- Specified by:
addThreadSynchroniserin interfaceSupplierCompileContext- Parameters:
threadSynchroniserFactory-ThreadSynchroniserFactory.
-
addManagedObjectSource
public <D extends Enum<D>,F extends Enum<F>> SuppliedManagedObjectSource addManagedObjectSource(String qualifier, Class<?> type, ManagedObjectSource<D, F> managedObjectSource) Description copied from interface:SupplierCompileContextAdds a potentialManagedObjectSourcefor dependency injection.- Specified by:
addManagedObjectSourcein interfaceSupplierCompileContext- Type Parameters:
D- Dependency type keys.F-Flowtype keys.- Parameters:
qualifier- Qualifier for theManagedObjectSource. May benullto match only on type.type- Type of theManagedObjectSource.managedObjectSource-ManagedObjectSource.- Returns:
SuppliedManagedObjectSource.
-
addInternalSupplier
Description copied from interface:SupplierCompileContextAdds anInternalSupplier.- Specified by:
addInternalSupplierin interfaceSupplierCompileContext- Parameters:
internalSupplier-InternalSupplier.
-
addCompileCompletion
Description copied from interface:SupplierSourceContextAdds aSupplierCompileCompletionto be invoked after compilation of respectiveOfficeFloor/Officefunctionality.- Specified by:
addCompileCompletionin interfaceSupplierSourceContext- Parameters:
completion-SupplierCompileCompletion.
-
getAvailableTypes
Description copied from interface:SupplierCompletionContextObtains the
AvailableTypeinstances.Note that
ManagedObjectinstances provided bySupplierSourceinstances are not included. This is becauseSupplierSourceinstances are not completed at this time to list their availableManagedObjectinstances.- Specified by:
getAvailableTypesin interfaceSupplierCompletionContext- Returns:
AvailableTypeinstances.
-