org.jboss.weld.context.beanstore
Interface BeanStore

All Superinterfaces:
Iterable<String>
All Known Subinterfaces:
BoundBeanStore
All Known Implementing Classes:
AbstractMapBackedBeanStore, AbstractSessionBeanStore, AttributeBeanStore, ConcurrentHashMapBeanStore, EagerSessionBeanStore, HashMapBeanStore, InvocationContextBeanStore, LazyCyclicSessionBeanStore, LazySessionBeanStore, MapBeanStore, RequestBeanStore

public interface BeanStore
extends Iterable<String>

A Map like store of contextual instances, used to back the Weld built in contexts.

Author:
Nicklas Karlsson

Method Summary
 void clear()
          Clears the store of contextual instances
 boolean contains(String id)
          Check if the store contains an instance
<T> org.jboss.weld.context.api.ContextualInstance<T>
get(String id)
          Gets an instance of a contextual from the store
 Iterator<String> iterator()
           
 LockedBean lock(String id)
          Gets a creation lock for the given bean id.
<T> void
put(String id, org.jboss.weld.context.api.ContextualInstance<T> contextualInstance)
          Adds a bean instance to the storage
 

Method Detail

get

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

Parameters:
id - The id of the contextual to return
Returns:
The instance or null if not found

contains

boolean contains(String id)
Check if the store contains an instance

Parameters:
id - the id of the instance to check for
Returns:
true if the instance is present, otherwise false

clear

void clear()
Clears the store of contextual instances


iterator

Iterator<String> iterator()
Specified by:
iterator in interface Iterable<String>

put

<T> void put(String id,
             org.jboss.weld.context.api.ContextualInstance<T> contextualInstance)
Adds a bean instance to the storage

Parameters:
contextualInstance - the contextual instance

lock

LockedBean lock(String id)
Gets a creation lock for the given bean id.

Parameters:
id - The bean id
Returns:
A handle that must be used to unlock the bean


Copyright © 2013 Seam Framework. All Rights Reserved.