Package org.apache.myfaces.cdi.util
Class AbstractContextualStorageHolder<T extends ContextualStorage>
java.lang.Object
org.apache.myfaces.cdi.util.AbstractContextualStorageHolder<T>
- All Implemented Interfaces:
- Serializable
- Direct Known Subclasses:
- ClientWindowScopeContextualStorageHolder,- FlowScopeContextualStorageHolder,- ViewScopeContextualStorageHolder
public abstract class AbstractContextualStorageHolder<T extends ContextualStorage>
extends Object
implements Serializable
- See Also:
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected FacesApplicationArtifactHolderprotected jakarta.enterprise.inject.spi.BeanManagerprotected boolean
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoiddestroyAll(FacesContext facesContext) voiddestroyAll(FacesContext context, String slotId) voiddestroyAll(T contextualStorage, FacesContext facesContext) This method will replace the storageMap and with a new empty one.getContextualStorage(String slotId) getContextualStorage(String slotId, boolean create) protected static <T extends AbstractContextualStorageHolder>
 TgetInstance(FacesContext facesContext, Class<T> contextManagerClass) protected static <T extends AbstractContextualStorageHolder>
 TgetInstance(FacesContext facesContext, Class<T> contextManagerClass, boolean create) abstract Class<? extends Annotation>getScope()voidinit()booleanprotected booleanisSkipDestroy(Map.Entry<Object, ContextualInstanceInfo<?>> entry) protected abstract TnewContextualStorage(String slotId) void
- 
Field Details- 
applicationContextBean
- 
beanManager@Inject protected jakarta.enterprise.inject.spi.BeanManager beanManager
- 
storageMap
- 
passivatingprotected boolean passivating
 
- 
- 
Constructor Details- 
AbstractContextualStorageHolderpublic AbstractContextualStorageHolder()
 
- 
- 
Method Details- 
init@PostConstruct public void init()
- 
forceNewStorageThis method will replace the storageMap and with a new empty one. This method can be used to properly destroy the BeanHolder beans without having to sync heavily. AnyContextual.destroy(Object, jakarta.enterprise.context.spi.CreationalContext)should be performed on the returned old storage map.- Returns:
- the old storageMap.
 
- 
getStorageMap
- 
getContextualStorage
- 
getContextualStorage
- 
newContextualStorage
- 
preDestroy@PreDestroy public void preDestroy()
- 
destroyAll
- 
destroyAll
- 
isSkipDestroy
- 
destroyAll
- 
getInstanceprotected static <T extends AbstractContextualStorageHolder> T getInstance(FacesContext facesContext, Class<T> contextManagerClass) 
- 
getInstanceprotected static <T extends AbstractContextualStorageHolder> T getInstance(FacesContext facesContext, Class<T> contextManagerClass, boolean create) 
- 
isPassivatingpublic boolean isPassivating()
- 
getScope
 
-