|
eXo Kernel :: Container 2.5.0-GA | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.exoplatform.container.context.ContextManagerImpl
public class ContextManagerImpl
The basic implementation of a ContextManager based on a ConcurrentHashMap that is
filled thanks to a component plugins.
| Field Summary |
|---|
| Fields inherited from interface org.exoplatform.container.component.ThreadContextHolder |
|---|
MANAGE_THREAD_LOCAL |
| Constructor Summary | |
|---|---|
ContextManagerImpl()
|
|
| Method Summary | ||
|---|---|---|
|
addContext(AdvancedContext<K> ctx)
Registers a context |
|
void |
addContexts(ContextPlugin plugin)
Adds all the contexts defined in the given plugin |
|
|
getContext(Class<? extends Annotation> scope)
Gives the context corresponding to the given scope |
|
ThreadContext |
getThreadContext()
Gives the value corresponding to the context of the thread |
|
boolean |
hasContext(Class<? extends Annotation> scope)
Indicates whether or not a context has a been registered for the given scope |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ContextManagerImpl()
| Method Detail |
|---|
public <K> AdvancedContext<K> getContext(Class<? extends Annotation> scope)
throws IllegalStateException
getContext in interface ContextManagerscope - the annotation class corresponding to the scope
Context corresponding to the given scope
IllegalStateExceptionpublic boolean hasContext(Class<? extends Annotation> scope)
hasContext in interface ContextManagerscope - the scope of the context
true if it exists a context for the given scope, false otherwisepublic <K> void addContext(AdvancedContext<K> ctx)
addContext in interface ContextManagerctx - the Context to registerpublic void addContexts(ContextPlugin plugin)
public ThreadContext getThreadContext()
getThreadContext in interface ThreadContextHolderThreadContext if there are some
valuable ThreadLocal variables to share otherwise null
is expected
|
eXo Kernel :: Container 2.5.0-GA | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||