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

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

public abstract class AbstractSessionBeanStore
extends AttributeBeanStore

Base class providing an HttpSession backed, bound bean store.

Author:
Pete Muir, David Allen, Nicklas Karlsson
See Also:
LazySessionBeanStore, EagerSessionBeanStore

Constructor Summary
AbstractSessionBeanStore(NamingScheme namingScheme)
           
 
Method Summary
<T> org.jboss.weld.context.api.ContextualInstance<T>
get(String id)
          Gets an instance of a contextual from the store
protected  Object getAttribute(String prefixedId)
          Gets an attribute from the underlying storage
protected  Collection<String> getAttributeNames()
          Gets an enumeration of the attribute names present in the underlying storage
protected  LockStore getLockStore()
           
protected abstract  javax.servlet.http.HttpSession getSession(boolean create)
           
protected  void removeAttribute(String key)
          Removes an attribute from the underlying storage
protected  void setAttribute(String key, Object instance)
          Sets an instance under a key in the underlying storage
 
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

AbstractSessionBeanStore

public AbstractSessionBeanStore(NamingScheme namingScheme)
Method Detail

getSession

protected abstract javax.servlet.http.HttpSession getSession(boolean create)

getAttributeNames

protected Collection<String> getAttributeNames()
Description copied from class: AttributeBeanStore
Gets an enumeration of the attribute names present in the underlying storage

Specified by:
getAttributeNames in class AttributeBeanStore
Returns:
The attribute names

removeAttribute

protected void removeAttribute(String key)
Description copied from class: AttributeBeanStore
Removes an attribute from the underlying storage

Specified by:
removeAttribute in class AttributeBeanStore
Parameters:
key - The (prefixed) id of the attribute to remove

setAttribute

protected void setAttribute(String key,
                            Object instance)
Description copied from class: AttributeBeanStore
Sets an instance under a key in the underlying storage

Specified by:
setAttribute in class AttributeBeanStore
Parameters:
key - The (prefixed) id of the attribute to set
instance - The instance

get

public <T> org.jboss.weld.context.api.ContextualInstance<T> get(String id)
Description copied from interface: BeanStore
Gets an instance of a contextual from the store

Specified by:
get in interface BeanStore
Overrides:
get in class AttributeBeanStore
Parameters:
id - The id of the contextual to return
Returns:
The instance or null if not found

getAttribute

protected Object getAttribute(String prefixedId)
Description copied from class: AttributeBeanStore
Gets an attribute from the underlying storage

Specified by:
getAttribute in class AttributeBeanStore
Parameters:
prefixedId - The (prefixed) id of the attribute
Returns:
The data

getLockStore

protected LockStore getLockStore()
Specified by:
getLockStore in class AttributeBeanStore


Copyright © 2013 Seam Framework. All Rights Reserved.