org.apache.aries.blueprint.di
Interface Repository

All Known Implementing Classes:
BlueprintRepository

public interface Repository


Method Summary
 java.lang.Object create(java.lang.String name)
           
 java.util.Map<java.lang.String,java.lang.Object> createAll(java.util.Collection<java.lang.String> names)
           
 void destroy()
           
<T> java.util.List<T>
getAllRecipes(java.lang.Class<T> clazz, java.lang.String... names)
           
 java.util.Set<Recipe> getAllRecipes(java.lang.String... names)
           
 java.lang.Object getInstance(java.lang.String name)
          Return the singleton instance for the given name.
 java.lang.Object getInstanceLock()
          Lock that should be used to synchronized creation of singletons
 java.util.Set<java.lang.String> getNames()
          Returns the set of all known object names (recipes, instances or default objects)
 Recipe getRecipe(java.lang.String name)
          Return the recipe for the given name.
 void putRecipe(java.lang.String name, Recipe recipe)
           
 void removeRecipe(java.lang.String name)
          Remove an uninstantiated recipe
 

Method Detail

getNames

java.util.Set<java.lang.String> getNames()
Returns the set of all known object names (recipes, instances or default objects)

Returns:

getInstance

java.lang.Object getInstance(java.lang.String name)
Return the singleton instance for the given name. This method will not create the object if it has been created yet.

Parameters:
name -
Returns:
the instance or null

getRecipe

Recipe getRecipe(java.lang.String name)
Return the recipe for the given name.

Parameters:
name -
Returns:
the recipe or null

putRecipe

void putRecipe(java.lang.String name,
               Recipe recipe)

removeRecipe

void removeRecipe(java.lang.String name)
Remove an uninstantiated recipe

Parameters:
name -
Throws:
ComponentDefinitionException - if the recipe is already instantiated

create

java.lang.Object create(java.lang.String name)
                        throws ComponentDefinitionException
Throws:
ComponentDefinitionException

createAll

java.util.Map<java.lang.String,java.lang.Object> createAll(java.util.Collection<java.lang.String> names)
                                                           throws ComponentDefinitionException
Throws:
ComponentDefinitionException

getAllRecipes

<T> java.util.List<T> getAllRecipes(java.lang.Class<T> clazz,
                                    java.lang.String... names)

getAllRecipes

java.util.Set<Recipe> getAllRecipes(java.lang.String... names)

destroy

void destroy()

getInstanceLock

java.lang.Object getInstanceLock()
Lock that should be used to synchronized creation of singletons

Returns:


Copyright © 2009-2011 The Apache Software Foundation. All Rights Reserved.