org.apache.aries.blueprint.di
Interface ExecutionContext

All Known Implementing Classes:
BlueprintRepository

public interface ExecutionContext


Nested Class Summary
static class ExecutionContext.Holder
           
 
Method Summary
 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 getObject(String name)
          Gets the object or recipe with the specified name from the repository.
 Object getPartialObject(String name)
           
 Recipe getRecipe(String name)
           
 Class loadClass(String className)
           
 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 removePartialObject(String name)
           
 

Method Detail

push

void push(Recipe recipe)
          throws CircularDependencyException
Adds a recipe to the top of the execution stack. If the recipe is already on the stack, a CircularDependencyException is thrown.

Parameters:
recipe - the recipe to add to the stack
Throws:
CircularDependencyException - if the recipe is already on the stack

pop

Recipe pop()
Removes the top recipe from the execution stack.

Returns:
the top recipe on the stack

containsObject

boolean containsObject(String name)
Does this context contain a object with the specified name.

Parameters:
name - the unique name of the object instance
Returns:
true if this context contain a object with the specified name

getObject

Object getObject(String name)
Gets the object or recipe with the specified name from the repository.

Parameters:
name - the unique name of the object instance
Returns:
the object instance, a recipe to build the object or null

addFullObject

Future<Object> addFullObject(String name,
                             Future<Object> object)
Try to add a full object and return the already registered future if available

Parameters:
name -
object -
Returns:

addPartialObject

void addPartialObject(String name,
                      Object object)

getPartialObject

Object getPartialObject(String name)

removePartialObject

void removePartialObject(String name)

convert

Object convert(Object value,
               org.osgi.service.blueprint.container.ReifiedType type)
               throws Exception
Throws:
Exception

canConvert

boolean canConvert(Object value,
                   org.osgi.service.blueprint.container.ReifiedType type)

loadClass

Class loadClass(String className)
                throws ClassNotFoundException
Throws:
ClassNotFoundException

getRecipe

Recipe getRecipe(String name)


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