|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jboss.webbeans.contexts.AbstractContext
public abstract class AbstractContext
Base for the Context implementations. Delegates calls to the abstract getBeanMap and getActive to allow for different implementations (storage types and ThreadLocal vs. shared)
org.jboss.webbeans.contexts.SharedContext,
BasicContext| Constructor Summary | |
|---|---|
AbstractContext(java.lang.Class<? extends java.lang.annotation.Annotation> scopeType)
Constructor |
|
| Method Summary | ||
|---|---|---|
void |
destroy()
Destroys the context |
|
|
get(Contextual<T> bean,
boolean create)
Get the bean if it exists in the contexts. |
|
protected java.lang.Boolean |
getActive()
Delegates to a ThreadLocal instance |
|
protected abstract BeanMap |
getBeanMap()
A method that should return the actual bean map implementation |
|
java.lang.Class<? extends java.lang.annotation.Annotation> |
getScopeType()
Get the scope the context is for |
|
boolean |
isActive()
Return true if the context is active |
|
void |
setActive(boolean active)
Set the context active, internal API for WBRI |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AbstractContext(java.lang.Class<? extends java.lang.annotation.Annotation> scopeType)
scopeType - The scope type| Method Detail |
|---|
public <T> T get(Contextual<T> bean,
boolean create)
get in interface Contextcreate - If true, a new instance of the bean will be created if none
exists
ContextNotActiveException - if the context is not activejavax.webbeans.manager.Context#get(Bean, boolean)public java.lang.Class<? extends java.lang.annotation.Annotation> getScopeType()
getScopeType in interface ContextContext.getScopeType()public boolean isActive()
isActive in interface ContextContext.isActive()public void setActive(boolean active)
active - The new statepublic void destroy()
protected abstract BeanMap getBeanMap()
protected java.lang.Boolean getActive()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||