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 07:05:04 +0100 (Wed, 06 Jan 2010) $

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

Method Detail

getName

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

Returns:
the unique name for this recipe.

getConstructorDependencies

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

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

Returns:
a list of dependencies

create

Object create()
              throws org.osgi.service.blueprint.container.ComponentDefinitionException
Create an instance for this recipe.

Returns:
a new instance for this recipe
Throws:
org.osgi.service.blueprint.container.ComponentDefinitionException

destroy

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

Parameters:
instance - the instance to be destroyed


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