@SessionScoped public class WindowBeanHolder extends Object implements Serializable
| Constructor and Description |
|---|
WindowBeanHolder() |
| Modifier and Type | Method and Description |
|---|---|
void |
destroyBeans()
This method properly destroys all current @WindowScoped beans
of the active session and also prepares the storage for new beans.
|
Map<String,org.apache.deltaspike.core.util.context.ContextualStorage> |
forceNewStorage()
This method will replace the storageMap and with
a new empty one.
|
org.apache.deltaspike.core.util.context.ContextualStorage |
getContextualStorage(javax.enterprise.inject.spi.BeanManager beanManager,
String windowId)
This method will return the ContextualStorage or create a new one
if no one is yet assigned to the current windowId.
|
Map<String,org.apache.deltaspike.core.util.context.ContextualStorage> |
getStorageMap() |
public org.apache.deltaspike.core.util.context.ContextualStorage getContextualStorage(javax.enterprise.inject.spi.BeanManager beanManager,
String windowId)
beanManager - we need the CDI BeanManager for serialisation.windowId - the windowId for the current browser tab or window.public Map<String,org.apache.deltaspike.core.util.context.ContextualStorage> getStorageMap()
public Map<String,org.apache.deltaspike.core.util.context.ContextualStorage> forceNewStorage()
Contextual.destroy(Object, javax.enterprise.context.spi.CreationalContext)
should be performed on the returned old storage map.@PreDestroy public void destroyBeans()
Copyright © 2011-2013 The Apache Software Foundation. All Rights Reserved.