Class AbstractSessionBeanStore
- java.lang.Object
-
- org.jboss.weld.context.beanstore.AttributeBeanStore
-
- org.jboss.weld.context.beanstore.http.AbstractSessionBeanStore
-
- All Implemented Interfaces:
Iterable<org.jboss.weld.serialization.spi.BeanIdentifier>,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
Constructors Constructor Description AbstractSessionBeanStore(NamingScheme namingScheme, boolean attributeLazyFetchingEnabled)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description <T> org.jboss.weld.context.api.ContextualInstance<T>get(org.jboss.weld.serialization.spi.BeanIdentifier id)Gets an instance of a contextual from the storeprotected ObjectgetAttribute(String prefixedId)Gets an attribute from the underlying storageprotected Iterator<String>getAttributeNames()Gets an enumeration of the attribute names present in the underlying storage.protected LockStoregetLockStore()protected abstract javax.servlet.http.HttpSessiongetSession(boolean create)protected voidremoveAttribute(String key)Removes an attribute from the underlying storageprotected voidsetAttribute(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, 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
-
AbstractSessionBeanStore
public AbstractSessionBeanStore(NamingScheme namingScheme, boolean attributeLazyFetchingEnabled)
- Parameters:
namingScheme-attributeLazyFetchingEnabled-
-
-
Method Detail
-
getSession
protected abstract javax.servlet.http.HttpSession getSession(boolean create)
-
getAttributeNames
protected Iterator<String> getAttributeNames()
Description copied from class:AttributeBeanStoreGets an enumeration of the attribute names present in the underlying storage. The collection must guarantee non-interference with other threads when iterating over it using iterator.- Specified by:
getAttributeNamesin classAttributeBeanStore- Returns:
- The attribute names
-
removeAttribute
protected void removeAttribute(String key)
Description copied from class:AttributeBeanStoreRemoves an attribute from the underlying storage- Specified by:
removeAttributein classAttributeBeanStore- Parameters:
key- The (prefixed) id of the attribute to remove
-
setAttribute
protected void setAttribute(String key, Object instance)
Description copied from class:AttributeBeanStoreSets an instance under a key in the underlying storage- Specified by:
setAttributein classAttributeBeanStore- Parameters:
key- The (prefixed) id of the attribute to setinstance- The instance
-
get
public <T> org.jboss.weld.context.api.ContextualInstance<T> get(org.jboss.weld.serialization.spi.BeanIdentifier id)
Description copied from interface:BeanStoreGets an instance of a contextual from the store- Specified by:
getin interfaceBeanStore- Overrides:
getin classAttributeBeanStore- 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:AttributeBeanStoreGets an attribute from the underlying storage- Specified by:
getAttributein classAttributeBeanStore- Parameters:
prefixedId- The (prefixed) id of the attribute- Returns:
- The data
-
getLockStore
protected LockStore getLockStore()
- Specified by:
getLockStorein classAttributeBeanStore
-
-