@Builtin @Singleton(eager=true) @Name(value="org.eiichiro.jaguar.scope.ThreadContext") public class ThreadContext extends Object implements Context
Constructor and Description |
---|
ThreadContext() |
Modifier and Type | Method and Description |
---|---|
<T> T |
get(Descriptor<T> descriptor)
Returns the component corresponding to the specified
Descriptor
from the ThreadLocal in current thread. |
<T> void |
put(Descriptor<T> descriptor,
T component)
Puts the specified component and descriptor pair into the
ThreadLocal in current thread. |
Object |
store()
Returns the component store this context manages.
|
public <T> T get(Descriptor<T> descriptor)
Descriptor
from the ThreadLocal
in current thread.get
in interface Context
T
- The component type.descriptor
- The descriptor corresponding to the component.Descriptor
.public <T> void put(Descriptor<T> descriptor, T component)
ThreadLocal
in current thread.Copyright © 2011-2014 Eiichiro Uchiumi. All Rights Reserved.