public class BlueprintRepository extends Object implements Repository, ExecutionContext
ExecutionContext.Holder| Constructor and Description |
|---|
BlueprintRepository(ExtendedBlueprintContainer container) |
| Modifier and Type | Method and Description |
|---|---|
Future<Object> |
addFullObject(String name,
Future<Object> object)
Try to add a full object and return the already registered future if available
|
void |
addPartialObject(String name,
Object object) |
boolean |
canConvert(Object value,
org.osgi.service.blueprint.container.ReifiedType type) |
boolean |
containsObject(String name)
Does this context contain a object with the specified name.
|
Object |
convert(Object value,
org.osgi.service.blueprint.container.ReifiedType type) |
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)
|
Object |
getObject(String name)
Gets the object or recipe with the specified name from the repository.
|
Object |
getPartialObject(String name) |
Recipe |
getRecipe(String name)
Return the recipe for the given name.
|
Class |
loadClass(String typeName) |
Recipe |
pop()
Removes the top recipe from the execution stack.
|
void |
push(Recipe recipe)
Adds a recipe to the top of the execution stack.
|
void |
putRecipe(String name,
Recipe recipe) |
void |
removePartialObject(String name) |
void |
removeRecipe(String name)
Remove an uninstantiated recipe
|
void |
validate() |
public BlueprintRepository(ExtendedBlueprintContainer container)
public Object getInstance(String name)
RepositorygetInstance in interface Repositorynullpublic Recipe getRecipe(String name)
RepositorygetRecipe in interface ExecutionContextgetRecipe in interface Repositorynullpublic Set<String> getNames()
RepositorygetNames in interface Repositorypublic void putRecipe(String name, Recipe recipe)
putRecipe in interface Repositorypublic void removeRecipe(String name)
RepositoryremoveRecipe in interface Repositorypublic Object create(String name) throws org.osgi.service.blueprint.container.ComponentDefinitionException
create in interface Repositoryorg.osgi.service.blueprint.container.ComponentDefinitionExceptionpublic Object create(String name, Collection<Class<?>> proxyInterfaces) throws org.osgi.service.blueprint.container.ComponentDefinitionException
create in interface Repositoryorg.osgi.service.blueprint.container.ComponentDefinitionExceptionpublic Map<String,Object> createAll(Collection<String> names, Collection<Class<?>> proxyInterfaces) throws org.osgi.service.blueprint.container.ComponentDefinitionException
createAll in interface Repositoryorg.osgi.service.blueprint.container.ComponentDefinitionExceptionpublic void createAll(Collection<String> names) throws org.osgi.service.blueprint.container.ComponentDefinitionException
createAll in interface Repositoryorg.osgi.service.blueprint.container.ComponentDefinitionExceptionpublic <T> List<T> getAllRecipes(Class<T> clazz, String... names)
getAllRecipes in interface Repositorypublic Set<Recipe> getAllRecipes(String... names)
getAllRecipes in interface Repositorypublic void validate()
public void destroy()
destroy in interface Repositorypublic void push(Recipe recipe)
ExecutionContextpush in interface ExecutionContextrecipe - the recipe to add to the stackpublic Recipe pop()
ExecutionContextpop in interface ExecutionContextpublic boolean containsObject(String name)
ExecutionContextcontainsObject in interface ExecutionContextname - the unique name of the object instancepublic Object getObject(String name)
ExecutionContextgetObject in interface ExecutionContextname - the unique name of the object instancepublic Future<Object> addFullObject(String name, Future<Object> object)
ExecutionContextaddFullObject in interface ExecutionContextpublic void addPartialObject(String name, Object object)
addPartialObject in interface ExecutionContextpublic Object getPartialObject(String name)
getPartialObject in interface ExecutionContextpublic void removePartialObject(String name)
removePartialObject in interface ExecutionContextpublic Object convert(Object value, org.osgi.service.blueprint.container.ReifiedType type) throws Exception
convert in interface ExecutionContextExceptionpublic boolean canConvert(Object value, org.osgi.service.blueprint.container.ReifiedType type)
canConvert in interface ExecutionContextpublic Class loadClass(String typeName) throws ClassNotFoundException
loadClass in interface ExecutionContextClassNotFoundExceptionCopyright © 2009-2015 The Apache Software Foundation. All Rights Reserved.