public abstract class AbstractContext extends java.lang.Object implements AlterableContext
contexts.SharedContext,
BasicContext| Constructor and Description |
|---|
AbstractContext(java.lang.String contextId,
boolean multithreaded)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
checkContextInitialized()
Allows contexts that are initialized lazily to plug in additional logic.
|
void |
cleanup() |
protected void |
destroy()
Destroys the context
|
void |
destroy(Contextual<?> contextual)
Destroy the existing contextual instance.
|
<T> T |
get(Contextual<T> contextual)
Return an existing instance of a certain contextual type or a null value.
|
<T> T |
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 static <T> Contextual<T> |
getContextual(java.lang.String contextId,
java.lang.String id) |
protected BeanIdentifier |
getId(Contextual<?> contextual) |
protected ServiceRegistry |
getServiceRegistry() |
public AbstractContext(java.lang.String contextId,
boolean multithreaded)
public <T> T get(Contextual<T> contextual, CreationalContext<T> creationalContext)
get in interface ContextT - the type of contextual typecontextual - the contextual typecreationalContext - the context in which the new instance will be createdContextNotActiveException - if the context is not activejavax.enterprise.context.spi.Context#get(BaseBean, boolean)public <T> T get(Contextual<T> contextual)
Contextpublic void destroy(Contextual<?> contextual)
AlterableContextDestroy the existing contextual instance. If there is no existing instance, no action is taken.
destroy in interface AlterableContextcontextual - the contextual typeprotected void destroy()
protected abstract BeanStore getBeanStore()
public void cleanup()
protected static <T> Contextual<T> getContextual(java.lang.String contextId, java.lang.String id)
protected BeanIdentifier getId(Contextual<?> contextual)
protected ServiceRegistry getServiceRegistry()
protected void checkContextInitialized()
Copyright © 2014. All Rights Reserved.