Interface OptionalThreadLocal<T>
-
- All Known Implementing Classes:
ThreadLocalImpl.OptionalThreadLocalImpl
public interface OptionalThreadLocal<T>Provides
ThreadLocalaccess to theManagedObjectobject instances.For applications making use of
OfficeFloorfunctionality this is not typically required. It is provided to enable integration with third party libraries requiringThreadLocalaccess to objects.- Author:
- Daniel Sagenschneider
- See Also:
ThreadDependencyMappingBuilder
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Tget()Obtains the object for the respectiveManagedObjectthis represents.
-
-
-
Method Detail
-
get
T get()
Obtains the object for the respective
ManagedObjectthis represents.This is optional, for if the
ManagedObjectis not yet instantiated then this will returnnull. AsManagedObjectinstances are asynchronously loaded, they can not be loaded synchronously for this method. Hence, it may returnnullif theManagedObjecthas not been required as a dependency.To ensure the
ManagedObjectis available, have theManagedFunctionorManagedObjectusing thisOptionalThreadLocaldepend on theManagedObjectthis represents.- Returns:
- Object from the
ManagedObjectornullifManagedObjectnot instantiated yet.
-
-