org.jboss.webbeans.context.api.helpers
Class AbstractMapBackedBeanStore

java.lang.Object
  extended by org.jboss.webbeans.context.api.helpers.AbstractMapBackedBeanStore
All Implemented Interfaces:
BeanStore
Direct Known Subclasses:
ConcurrentHashMapBeanStore

public abstract class AbstractMapBackedBeanStore
extends java.lang.Object
implements BeanStore


Constructor Summary
AbstractMapBackedBeanStore()
           
 
Method Summary
 void clear()
          Clears the store
abstract  java.util.Map<Contextual<? extends java.lang.Object>,java.lang.Object> delegate()
           
<T> T
get(Contextual<? extends T> bean)
          Gets an instance from the store
 java.util.Set<Contextual<? extends java.lang.Object>> getBeans()
          Returns the beans contained in the store
<T> void
put(Contextual<? extends T> bean, T instance)
          Puts a bean instance under the bean key in the store
<T> T
remove(Contextual<? extends T> bean)
          Removed a instance from the store
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AbstractMapBackedBeanStore

public AbstractMapBackedBeanStore()
Method Detail

delegate

public abstract java.util.Map<Contextual<? extends java.lang.Object>,java.lang.Object> delegate()

get

public <T> T get(Contextual<? extends T> bean)
Gets an instance from the store

Specified by:
get in interface BeanStore
Parameters:
The - bean to look for
Returns:
An instance, if found
See Also:
org.jboss.webbeans.context.api.BeanStore#get(Bean)

remove

public <T> T remove(Contextual<? extends T> bean)
Removed a instance from the store

Specified by:
remove in interface BeanStore
Parameters:
bean - the bean to remove
Returns:
The instance removed
See Also:
org.jboss.webbeans.context.api.BeanStore#remove(Bean)

clear

public void clear()
Clears the store

Specified by:
clear in interface BeanStore
See Also:
BeanStore.clear()

getBeans

public java.util.Set<Contextual<? extends java.lang.Object>> getBeans()
Returns the beans contained in the store

Specified by:
getBeans in interface BeanStore
Returns:
The beans present
See Also:
BeanStore.getBeans()

put

public <T> void put(Contextual<? extends T> bean,
                    T instance)
Puts a bean instance under the bean key in the store

Specified by:
put in interface BeanStore
Parameters:
bean - The bean
instance - the instance
See Also:
org.jboss.webbeans.context.api.BeanStore#put(Bean, Object)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2011. All Rights Reserved.