Class ThreadLocalImpl.OptionalThreadLocalImpl<T>
java.lang.Object
net.officefloor.frame.impl.execute.thread.ThreadLocalImpl.OptionalThreadLocalImpl<T>
- All Implemented Interfaces:
OptionalThreadLocal<T>
- Enclosing class:
- ThreadLocalImpl<T>
public static class ThreadLocalImpl.OptionalThreadLocalImpl<T>
extends Object
implements OptionalThreadLocal<T>
OptionalThreadLocal implementation.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionget()Obtains the object for the respectiveManagedObjectthis represents.
-
Constructor Details
-
OptionalThreadLocalImpl
public OptionalThreadLocalImpl()
-
-
Method Details
-
get
Description copied from interface:OptionalThreadLocalObtains 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.- Specified by:
getin interfaceOptionalThreadLocal<T>- Returns:
- Object from the
ManagedObjectornullifManagedObjectnot instantiated yet.
-