org.apache.aries.blueprint.di
Interface Recipe

All Known Subinterfaces:
SatisfiableRecipe
All Known Implementing Classes:
AbstractRecipe, AbstractServiceReferenceRecipe, ArrayRecipe, BeanRecipe, CollectionRecipe, ComponentFactoryRecipe, DependentComponentFactoryRecipe, IdRefRecipe, MapRecipe, PassThroughRecipe, ReferenceListRecipe, ReferenceRecipe, RefRecipe, ServiceRecipe, ValueRecipe

public interface Recipe

The Recipe interface abstracts the creation of objects

Version:
$Rev: 896324 $ $Date: 2010-01-06 06:05:04 +0000 (Wed, 06 Jan 2010) $

Method Summary
 java.lang.Object create()
          Create an instance for this recipe.
 void destroy(java.lang.Object instance)
          Destroy an instance created by this recipe
 java.util.List<Recipe> getConstructorDependencies()
          Get the list of constructor dependencies, i.e.
 java.util.List<Recipe> getDependencies()
          Get the list of nested recipes, i.e.
 java.lang.String getName()
          Get the unique name for this recipe.
 

Method Detail

getName

java.lang.String getName()
Get the unique name for this recipe.

Returns:
the unique name for this recipe.

getConstructorDependencies

java.util.List<Recipe> getConstructorDependencies()
Get the list of constructor dependencies, i.e. explicit and argument dependencies. These dependencies must be satisfied before the an object can be created.

Returns:
a list of constructor dependencies

getDependencies

java.util.List<Recipe> getDependencies()
Get the list of nested recipes, i.e. all dependencies including constructor dependencies.

Returns:
a list of dependencies

create

java.lang.Object create()
                        throws ComponentDefinitionException
Create an instance for this recipe.

Returns:
a new instance for this recipe
Throws:
ComponentDefinitionException

destroy

void destroy(java.lang.Object instance)
Destroy an instance created by this recipe

Parameters:
instance - the instance to be destroyed


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