|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.myfaces.cdi.util.AbstractContext
public abstract class AbstractContext
A skeleton containing the most important parts of a custom CDI Context.
An implementing Context needs to implement the missing methods from the
Context interface and getContextualStorage(boolean).
NOTE: Taken from Apache DeltaSpike
| Constructor Summary | |
|---|---|
protected |
AbstractContext(javax.enterprise.inject.spi.BeanManager beanManager)
|
| Method Summary | ||
|---|---|---|
protected void |
checkActive()
Make sure that the Context is really active. |
|
boolean |
destroy(javax.enterprise.context.spi.Contextual bean)
Destroy the Contextual Instance of the given Bean. |
|
void |
destroyAllActive()
destroys all the Contextual Instances in the Storage returned by getContextualStorage(boolean). |
|
static void |
destroyAllActive(ContextualStorage storage)
Destroys all the Contextual Instances in the specified ContextualStorage. |
|
|
get(javax.enterprise.context.spi.Contextual<T> bean)
|
|
|
get(javax.enterprise.context.spi.Contextual<T> bean,
javax.enterprise.context.spi.CreationalContext<T> creationalContext)
|
|
protected abstract ContextualStorage |
getContextualStorage(boolean createIfNotExist)
An implementation has to return the underlying storage which contains the items held in the Context. |
|
boolean |
isPassivatingScope()
|
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface javax.enterprise.context.spi.Context |
|---|
getScope, isActive |
| Constructor Detail |
|---|
protected AbstractContext(javax.enterprise.inject.spi.BeanManager beanManager)
| Method Detail |
|---|
protected abstract ContextualStorage getContextualStorage(boolean createIfNotExist)
createIfNotExist - whether a ContextualStorage shall get created if it doesn't yet exist.
public boolean isPassivatingScope()
public <T> T get(javax.enterprise.context.spi.Contextual<T> bean)
get in interface javax.enterprise.context.spi.Context
public <T> T get(javax.enterprise.context.spi.Contextual<T> bean,
javax.enterprise.context.spi.CreationalContext<T> creationalContext)
get in interface javax.enterprise.context.spi.Contextpublic boolean destroy(javax.enterprise.context.spi.Contextual bean)
bean - dictates which bean shall get cleaned up
true if the bean was destroyed, false if there was no such bean.public void destroyAllActive()
getContextualStorage(boolean).
public static void destroyAllActive(ContextualStorage storage)
protected void checkActive()
javax.enterprise.context.ContextNotActiveException - if there is no active
Context for the current Thread.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||