Class LazySessionBeanStore
- java.lang.Object
-
- org.jboss.weld.contexts.beanstore.AttributeBeanStore
-
- org.jboss.weld.module.web.context.beanstore.http.AbstractSessionBeanStore
-
- org.jboss.weld.module.web.context.beanstore.http.LazySessionBeanStore
-
- All Implemented Interfaces:
Iterable<org.jboss.weld.serialization.spi.BeanIdentifier>,BeanStore,BoundBeanStore
public class LazySessionBeanStore extends AbstractSessionBeanStore
A BeanStore that uses a HTTP session as backing storage.
Unlike
EagerSessionBeanStore, this bean store is backed by an HttpRequest, and only requires the session to be created when it needs to write an instance to it.This class is not threadsafe
- Author:
- Nicklas Karlsson, David Allen, Pete Muir, Ales Justin
- See Also:
EagerSessionBeanStore
-
-
Constructor Summary
Constructors Constructor Description LazySessionBeanStore(jakarta.servlet.http.HttpServletRequest request, NamingScheme namingScheme, boolean attributeLazyFetchingEnabled, org.jboss.weld.bootstrap.api.ServiceRegistry serviceRegistry)LazySessionBeanStore(jakarta.servlet.http.HttpServletRequest request, NamingScheme namingScheme, org.jboss.weld.bootstrap.api.ServiceRegistry serviceRegistry)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected jakarta.servlet.http.HttpSessiongetSession(boolean create)protected jakarta.servlet.http.HttpSessiongetSessionIfExists()Get the session, create equals false;-
Methods inherited from class org.jboss.weld.module.web.context.beanstore.http.AbstractSessionBeanStore
get, getAttribute, getAttributeNames, getLockStore, removeAttribute, setAttribute
-
Methods inherited from class org.jboss.weld.contexts.beanstore.AttributeBeanStore
attach, clear, contains, detach, fetchUninitializedAttributes, getNamingScheme, getPrefixedAttributeNames, isAttached, isAttributeLazyFetchingEnabled, isLocalBeanStoreSyncNeeded, iterator, lock, put, remove
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Constructor Detail
-
LazySessionBeanStore
public LazySessionBeanStore(jakarta.servlet.http.HttpServletRequest request, NamingScheme namingScheme, org.jboss.weld.bootstrap.api.ServiceRegistry serviceRegistry)- Parameters:
request-namingScheme-
-
LazySessionBeanStore
public LazySessionBeanStore(jakarta.servlet.http.HttpServletRequest request, NamingScheme namingScheme, boolean attributeLazyFetchingEnabled, org.jboss.weld.bootstrap.api.ServiceRegistry serviceRegistry)- Parameters:
request-namingScheme-attributeLazyFetchingEnabled-
-
-
Method Detail
-
getSessionIfExists
protected jakarta.servlet.http.HttpSession getSessionIfExists()
Get the session, create equals false;- Returns:
- http session or null if no such session exists
-
getSession
protected jakarta.servlet.http.HttpSession getSession(boolean create)
- Specified by:
getSessionin classAbstractSessionBeanStore
-
-