org.jboss.weld.context.beanstore.http
Class LazySessionBeanStore

java.lang.Object
  extended by org.jboss.weld.context.beanstore.AttributeBeanStore
      extended by org.jboss.weld.context.beanstore.http.AbstractSessionBeanStore
          extended by org.jboss.weld.context.beanstore.http.LazySessionBeanStore
All Implemented Interfaces:
Iterable<String>, BeanStore, BoundBeanStore
Direct Known Subclasses:
LazyCyclicSessionBeanStore

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
LazySessionBeanStore(javax.servlet.http.HttpServletRequest request, NamingScheme namingScheme)
           
 
Method Summary
protected  javax.servlet.http.HttpSession getSession(boolean create)
           
protected  javax.servlet.http.HttpSession getSessionIfExists()
          Get the session, create equals false;
 
Methods inherited from class org.jboss.weld.context.beanstore.http.AbstractSessionBeanStore
get, getAttribute, getAttributeNames, getLockStore, removeAttribute, setAttribute
 
Methods inherited from class org.jboss.weld.context.beanstore.AttributeBeanStore
attach, clear, contains, detach, getNamingScheme, getPrefixedAttributeNames, isAttached, iterator, lock, put
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LazySessionBeanStore

public LazySessionBeanStore(javax.servlet.http.HttpServletRequest request,
                            NamingScheme namingScheme)
Method Detail

getSessionIfExists

protected javax.servlet.http.HttpSession getSessionIfExists()
Get the session, create equals false;

Returns:
http session or null if no such session exists

getSession

protected javax.servlet.http.HttpSession getSession(boolean create)
Specified by:
getSession in class AbstractSessionBeanStore


Copyright © 2013 Seam Framework. All Rights Reserved.