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:
- Serialized Form
 
- 
- 
Field SummaryFields Modifier and Type Field Description protected FacesApplicationArtifactHolderapplicationContextBeanprotected jakarta.enterprise.inject.spi.BeanManagerbeanManagerprotected booleanpassivatingprotected Map<String,T>storageMap
 - 
Constructor SummaryConstructors Constructor Description AbstractContextualStorageHolder()
 - 
Method SummaryAll Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voiddestroyAll(FacesContext facesContext)voiddestroyAll(FacesContext context, String slotId)voiddestroyAll(T contextualStorage, FacesContext facesContext)Map<String,T>forceNewStorage()This method will replace the storageMap and with a new empty one.TgetContextualStorage(String slotId)TgetContextualStorage(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()Map<String,T>getStorageMap()voidinit()booleanisPassivating()protected booleanisSkipDestroy(Map.Entry<Object,ContextualInstanceInfo<?>> entry)protected abstract TnewContextualStorage(String slotId)voidpreDestroy()
 
- 
- 
- 
Field Detail- 
applicationContextBean@Inject protected FacesApplicationArtifactHolder applicationContextBean 
 - 
beanManager@Inject protected jakarta.enterprise.inject.spi.BeanManager beanManager 
 - 
storageMapprotected Map<String,T extends ContextualStorage> storageMap 
 - 
passivatingprotected boolean passivating 
 
- 
 - 
Method Detail- 
init@PostConstruct public void init() 
 - 
forceNewStoragepublic Map<String,T> forceNewStorage() This 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.
 
 - 
preDestroy@PreDestroy public void preDestroy() 
 - 
destroyAllpublic void destroyAll(FacesContext facesContext) 
 - 
destroyAllpublic void destroyAll(T contextualStorage, FacesContext facesContext) 
 - 
isSkipDestroyprotected boolean isSkipDestroy(Map.Entry<Object,ContextualInstanceInfo<?>> entry) 
 - 
destroyAllpublic void destroyAll(FacesContext context, String slotId) 
 - 
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() 
 - 
getScopepublic abstract Class<? extends Annotation> getScope() 
 
- 
 
-