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
SupplierSourceContextimplementation.- Author:
- Daniel Sagenschneider
-
-
Constructor Summary
Constructors Constructor Description SupplierSourceContextImpl(java.lang.String supplierSourceName, boolean isLoadingType, java.lang.String[] additionalProfiles, PropertyList propertyList, NodeContext context)Initiate.
-
Method Summary
-
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, loadServices
-
Methods inherited from class net.officefloor.frame.impl.construct.source.SourcePropertiesImpl
addProperty, getProperties, getProperty, getProperty, getPropertyNames
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.officefloor.frame.api.source.SourceContext
getClassLoader, getClock, getLogger, getName, getOptionalResource, getProfiles, getResource, isLoadingType, loadClass, loadOptionalClass, loadOptionalService, loadOptionalServices, loadService, loadService, loadServices
-
Methods inherited from interface net.officefloor.frame.api.source.SourceProperties
getProperties, getProperty, getProperty, getPropertyNames
-
-
-
-
Constructor Detail
-
SupplierSourceContextImpl
public SupplierSourceContextImpl(java.lang.String supplierSourceName, boolean isLoadingType, java.lang.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 Detail
-
getSupplierThreadLocalTypes
public SupplierThreadLocalType[] getSupplierThreadLocalTypes()
Description copied from interface:SupplierCompileConfigurationObtains theSupplierThreadLocalTypeinstances.- Specified by:
getSupplierThreadLocalTypesin interfaceSupplierCompileConfiguration- Returns:
SupplierThreadLocalTypeinstances.
-
getThreadSynchronisers
public ThreadSynchroniserFactory[] getThreadSynchronisers()
Description copied from interface:SupplierCompileConfigurationObtains theThreadSynchroniserFactoryinstances.- Specified by:
getThreadSynchronisersin interfaceSupplierCompileConfiguration- Returns:
ThreadSynchroniserFactoryinstances.
-
getSuppliedManagedObjectSourceTypes
public SuppliedManagedObjectSourceType[] getSuppliedManagedObjectSourceTypes()
Description copied from interface:SupplierCompileConfigurationObtains theSuppliedManagedObjectSourceTypeinstances.- Specified by:
getSuppliedManagedObjectSourceTypesin interfaceSupplierCompileConfiguration- Returns:
SuppliedManagedObjectSourceTypeinstances.
-
getInternalSuppliers
public InternalSupplier[] getInternalSuppliers()
Description copied from interface:SupplierCompileConfigurationObtains theInternalSupplierinstances.- Specified by:
getInternalSuppliersin interfaceSupplierCompileConfiguration- Returns:
InternalSupplierinstances.
-
getCompileCompletions
public SupplierCompileCompletion[] getCompileCompletions()
Description copied from interface:SupplierCompileConfigurationObtains theSupplierCompileCompletioninstances.- Specified by:
getCompileCompletionsin interfaceSupplierCompileConfiguration- Returns:
SupplierCompileCompletioninstances.
-
addSupplierThreadLocal
public <T> SupplierThreadLocal<T> addSupplierThreadLocal(java.lang.String qualifier, java.lang.Class<? extends T> type)
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
public void addThreadSynchroniser(ThreadSynchroniserFactory threadSynchroniserFactory)
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 java.lang.Enum<D>,F extends java.lang.Enum<F>> SuppliedManagedObjectSource addManagedObjectSource(java.lang.String qualifier, java.lang.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
public void addInternalSupplier(InternalSupplier internalSupplier)
Description copied from interface:SupplierCompileContextAdds anInternalSupplier.- Specified by:
addInternalSupplierin interfaceSupplierCompileContext- Parameters:
internalSupplier-InternalSupplier.
-
addCompileCompletion
public void addCompileCompletion(SupplierCompileCompletion completion)
Description copied from interface:SupplierSourceContextAdds aSupplierCompileCompletionto be invoked after compilation of respectiveOfficeFloor/Officefunctionality.- Specified by:
addCompileCompletionin interfaceSupplierSourceContext- Parameters:
completion-SupplierCompileCompletion.
-
getAvailableTypes
public AvailableType[] 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.
-
-