|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.webbeans.context.AbstractContext
org.jboss.webbeans.context.AbstractMapContext
public abstract class AbstractMapContext
Base for the Context implementations. Delegates calls to the abstract getBeanStorage and getActive to allow for different implementations (storage types and ThreadLocal vs. shared)
org.jboss.webbeans.contexts.SharedContext
,
org.jboss.webbeans.context.BasicContext
Constructor Summary | |
---|---|
AbstractMapContext(java.lang.Class<? extends java.lang.annotation.Annotation> scopeType)
Constructor |
Method Summary | ||
---|---|---|
void |
destroy()
Destroys the context |
|
|
get(Contextual<T> contextual)
Return an existing instance of a contextual type or create a new instance of a contextual type |
|
|
get(Contextual<T> contextual,
CreationalContext<T> creationalContext)
Get the bean if it exists in the contexts. |
|
protected abstract BeanStore |
getBeanStore()
A method that returns the actual bean store implementation |
|
protected abstract boolean |
isCreationLockRequired()
If Context need to inhibit concurrent instance creation then true, else false. |
Methods inherited from class org.jboss.webbeans.context.AbstractContext |
---|
getActive, getScopeType, isActive, setActive |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AbstractMapContext(java.lang.Class<? extends java.lang.annotation.Annotation> scopeType)
scopeType
- The scope typeMethod Detail |
---|
public <T> T get(Contextual<T> contextual, CreationalContext<T> creationalContext)
T
- the type of contextual typecreate
- If true, a new instance of the bean will be created if none
exists
ContextNotActiveException
- if the context is not activejavax.context.Context#get(Bean, boolean)
public <T> T get(Contextual<T> contextual)
Context
T
- the type of the contextual typecontextual
- the contextual type
public void destroy()
protected abstract BeanStore getBeanStore()
protected abstract boolean isCreationLockRequired()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |