org.apache.aries.blueprint.di
Interface ExecutionContext

All Known Implementing Classes:
BlueprintRepository

public interface ExecutionContext


Nested Class Summary
static class ExecutionContext.Holder
           
 
Method Summary
 void addFullObject(java.lang.String name, java.lang.Object object)
           
 void addPartialObject(java.lang.String name, java.lang.Object object)
           
 boolean canConvert(java.lang.Object value, ReifiedType type)
           
 boolean containsObject(java.lang.String name)
          Does this context contain a object with the specified name.
 java.lang.Object convert(java.lang.Object value, ReifiedType type)
           
 java.lang.Object getInstanceLock()
          Lock that should be used to synchronized creation of singletons
 java.lang.Object getObject(java.lang.String name)
          Gets the object or recipe with the specified name from the repository.
 java.lang.Object getPartialObject(java.lang.String name)
           
 Recipe getRecipe(java.lang.String name)
           
 java.lang.Class loadClass(java.lang.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.
 java.lang.Object removePartialObject(java.lang.String name)
           
 

Method Detail

getInstanceLock

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

Returns:

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(java.lang.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

java.lang.Object getObject(java.lang.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

void addFullObject(java.lang.String name,
                   java.lang.Object object)

addPartialObject

void addPartialObject(java.lang.String name,
                      java.lang.Object object)

removePartialObject

java.lang.Object removePartialObject(java.lang.String name)

getPartialObject

java.lang.Object getPartialObject(java.lang.String name)

convert

java.lang.Object convert(java.lang.Object value,
                         ReifiedType type)
                         throws java.lang.Exception
Throws:
java.lang.Exception

canConvert

boolean canConvert(java.lang.Object value,
                   ReifiedType type)

loadClass

java.lang.Class loadClass(java.lang.String className)
                          throws java.lang.ClassNotFoundException
Throws:
java.lang.ClassNotFoundException

getRecipe

Recipe getRecipe(java.lang.String name)


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