public class ContextualStorage extends Object implements Serializable
Modifier and Type | Field and Description |
---|---|
protected javax.enterprise.inject.spi.BeanManager |
beanManager |
protected boolean |
concurrent |
protected Map<Object,ContextualInstanceInfo<?>> |
contextualInstances |
Constructor and Description |
---|
ContextualStorage(javax.enterprise.inject.spi.BeanManager beanManager,
boolean concurrent) |
Modifier and Type | Method and Description |
---|---|
<T> T |
createContextualInstance(javax.enterprise.context.spi.Contextual<T> bean,
javax.enterprise.context.spi.CreationalContext<T> creationalContext) |
javax.enterprise.context.spi.Contextual<?> |
getBean(Object beanKey)
Restores the Bean from its beanKey.
|
<T> Object |
getBeanKey(javax.enterprise.context.spi.Contextual<T> bean)
If the context is a passivating scope then we return the passivationId of the Bean.
|
Map<Object,ContextualInstanceInfo<?>> |
getStorage() |
boolean |
isConcurrent() |
protected final Map<Object,ContextualInstanceInfo<?>> contextualInstances
protected final javax.enterprise.inject.spi.BeanManager beanManager
protected final boolean concurrent
public ContextualStorage(javax.enterprise.inject.spi.BeanManager beanManager, boolean concurrent)
beanManager
- is needed for serialisationconcurrent
- whether the ContextualStorage might get accessed concurrently by different threadspublic Map<Object,ContextualInstanceInfo<?>> getStorage()
public boolean isConcurrent()
public <T> T createContextualInstance(javax.enterprise.context.spi.Contextual<T> bean, javax.enterprise.context.spi.CreationalContext<T> creationalContext)
T
- bean
- creationalContext
- public <T> Object getBeanKey(javax.enterprise.context.spi.Contextual<T> bean)
bean
- public javax.enterprise.context.spi.Contextual<?> getBean(Object beanKey)
Copyright © 2022 The Apache Software Foundation. All rights reserved.