|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjodd.petite.scope.ThreadLocalScope
public class ThreadLocalScope
Thread local Petite bean scope. Holds beans in thread local scopes.
| Field Summary | |
|---|---|
protected static ThreadLocal<Map<String,Object>> |
context
|
| Constructor Summary | |
|---|---|
ThreadLocalScope()
|
|
| Method Summary | |
|---|---|
boolean |
accept(Scope referenceScope)
Defines allowed referenced scopes that can be injected into the thread-local scoped bean. |
Object |
lookup(String name)
Lookups for bean name. |
void |
register(String name,
Object bean)
Registers the bean within the current scope. |
void |
remove(String name)
Removes the bean from the scope entirely. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static ThreadLocal<Map<String,Object>> context
| Constructor Detail |
|---|
public ThreadLocalScope()
| Method Detail |
|---|
public Object lookup(String name)
Scoperegistration,
therefore it should returns null if object is not
yet registered.
lookup in interface Scope
public void register(String name,
Object bean)
Scope
register in interface Scopepublic void remove(String name)
Scope
remove in interface Scopepublic boolean accept(Scope referenceScope)
accept in interface Scope
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||