org.apache.aries.blueprint.di
Interface Repository

All Known Implementing Classes:
BlueprintRepository

public interface Repository


Method Summary
 Object create(String name)
           
 Object create(String name, Collection<Class<?>> proxyInterfaces)
           
 void createAll(Collection<String> names)
           
 Map<String,Object> createAll(Collection<String> names, Collection<Class<?>> proxyInterfaces)
           
 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.
 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)
           
 void removeRecipe(String name)
          Remove an uninstantiated 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 not 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)

removeRecipe

void removeRecipe(String name)
Remove an uninstantiated recipe

Parameters:
name -
Throws:
org.osgi.service.blueprint.container.ComponentDefinitionException - if the recipe is already instantiated

create

Object create(String name)
              throws org.osgi.service.blueprint.container.ComponentDefinitionException
Throws:
org.osgi.service.blueprint.container.ComponentDefinitionException

create

Object create(String name,
              Collection<Class<?>> proxyInterfaces)
              throws org.osgi.service.blueprint.container.ComponentDefinitionException
Throws:
org.osgi.service.blueprint.container.ComponentDefinitionException

createAll

void createAll(Collection<String> names)
               throws org.osgi.service.blueprint.container.ComponentDefinitionException
Throws:
org.osgi.service.blueprint.container.ComponentDefinitionException

createAll

Map<String,Object> createAll(Collection<String> names,
                             Collection<Class<?>> proxyInterfaces)
                             throws org.osgi.service.blueprint.container.ComponentDefinitionException
Throws:
org.osgi.service.blueprint.container.ComponentDefinitionException

getAllRecipes

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

getAllRecipes

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

destroy

void destroy()


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