public abstract class AbstractContext extends Object implements javax.enterprise.context.spi.AlterableContext
org.jboss.weld.contexts.SharedContext
,
org.jboss.weld.context.BasicContext
Constructor and Description |
---|
AbstractContext(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(javax.enterprise.context.spi.Contextual<?> contextual) |
<T> T |
get(javax.enterprise.context.spi.Contextual<T> contextual) |
<T> T |
get(javax.enterprise.context.spi.Contextual<T> contextual,
javax.enterprise.context.spi.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> javax.enterprise.context.spi.Contextual<T> |
getContextual(String contextId,
String id) |
protected org.jboss.weld.serialization.spi.BeanIdentifier |
getId(javax.enterprise.context.spi.Contextual<?> contextual) |
protected org.jboss.weld.bootstrap.api.ServiceRegistry |
getServiceRegistry() |
public AbstractContext(String contextId, boolean multithreaded)
public <T> T get(javax.enterprise.context.spi.Contextual<T> contextual, javax.enterprise.context.spi.CreationalContext<T> creationalContext)
get
in interface javax.enterprise.context.spi.Context
ContextNotActiveException
- if the context is not activejavax.enterprise.context.spi.Context#get(BaseBean, boolean)
public <T> T get(javax.enterprise.context.spi.Contextual<T> contextual)
get
in interface javax.enterprise.context.spi.Context
public void destroy(javax.enterprise.context.spi.Contextual<?> contextual)
destroy
in interface javax.enterprise.context.spi.AlterableContext
protected void destroy()
protected abstract BeanStore getBeanStore()
public void cleanup()
protected static <T> javax.enterprise.context.spi.Contextual<T> getContextual(String contextId, String id)
protected org.jboss.weld.serialization.spi.BeanIdentifier getId(javax.enterprise.context.spi.Contextual<?> contextual)
protected org.jboss.weld.bootstrap.api.ServiceRegistry getServiceRegistry()
protected void checkContextInitialized()
Copyright © 2016. All rights reserved.