org.apache.geronimo.blueprint.di
Interface Repository

All Known Implementing Classes:
BlueprintRepository

public interface Repository


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

Method Detail

getNames

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

Returns:

getInstance

Object getInstance(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(String name)
Return the recipe for the given name.

Parameters:
name -
Returns:
the recipe or null

putRecipe

void putRecipe(String name,
               Recipe recipe)

create

Object create(String name)
              throws ComponentDefinitionException
Throws:
ComponentDefinitionException

createAll

Map<String,Object> createAll(Collection<String> names)
                             throws ComponentDefinitionException
Throws:
ComponentDefinitionException

getAllRecipes

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

getAllRecipes

Set<Recipe> getAllRecipes(String... names)

destroy

void destroy()

getInstanceLock

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

Returns:


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