org.apache.aries.blueprint.container
Class ServiceRecipe

java.lang.Object
  extended by org.apache.aries.blueprint.di.AbstractRecipe
      extended by org.apache.aries.blueprint.container.ServiceRecipe
All Implemented Interfaces:
Recipe

public class ServiceRecipe
extends AbstractRecipe

A Recipe to export services into the OSGi registry.

Version:
$Rev: 1052392 $, $Date: 2010-12-23 22:13:45 +0000 (Thu, 23 Dec 2010) $

Field Summary
 
Fields inherited from class org.apache.aries.blueprint.di.AbstractRecipe
name, prototype
 
Constructor Summary
ServiceRecipe(java.lang.String name, ExtendedBlueprintContainer blueprintContainer, ServiceMetadata metadata, Recipe serviceRecipe, CollectionRecipe listenersRecipe, MapRecipe propertiesRecipe, java.util.List<Recipe> explicitDependencies)
           
 
Method Summary
protected  void decrementActiveCalls()
           
 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.
 CollectionRecipe getListenersRecipe()
           
protected  org.osgi.framework.ServiceReference getReference()
           
 java.lang.Object getService(org.osgi.framework.Bundle bundle, org.osgi.framework.ServiceRegistration registration)
           
 Recipe getServiceRecipe()
           
protected  void incrementActiveCalls()
           
protected  java.lang.Object internalCreate()
           
protected  java.lang.Object internalGetService()
           
 boolean isRegistered()
           
 void quiesce(DestroyCallback destroyCallback)
           
 void register()
           
protected  void setProperties(java.util.Dictionary props)
           
 void ungetService(org.osgi.framework.Bundle bundle, org.osgi.framework.ServiceRegistration registration, java.lang.Object service)
           
 void unregister()
           
 
Methods inherited from class org.apache.aries.blueprint.di.AbstractRecipe
addPartialObject, convert, convert, create, destroy, getName, isPrototype, loadClass, loadType, loadType, setPrototype, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ServiceRecipe

public ServiceRecipe(java.lang.String name,
                     ExtendedBlueprintContainer blueprintContainer,
                     ServiceMetadata metadata,
                     Recipe serviceRecipe,
                     CollectionRecipe listenersRecipe,
                     MapRecipe propertiesRecipe,
                     java.util.List<Recipe> explicitDependencies)
Method Detail

getServiceRecipe

public Recipe getServiceRecipe()

getListenersRecipe

public CollectionRecipe getListenersRecipe()

getConstructorDependencies

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

Specified by:
getConstructorDependencies in interface Recipe
Overrides:
getConstructorDependencies in class AbstractRecipe
Returns:
a list of constructor dependencies

getDependencies

public java.util.List<Recipe> getDependencies()
Description copied from interface: Recipe
Get the list of nested recipes, i.e. all dependencies including constructor dependencies.

Returns:
a list of dependencies

internalCreate

protected java.lang.Object internalCreate()
                                   throws ComponentDefinitionException
Specified by:
internalCreate in class AbstractRecipe
Throws:
ComponentDefinitionException

isRegistered

public boolean isRegistered()

register

public void register()

unregister

public void unregister()

getReference

protected org.osgi.framework.ServiceReference getReference()

setProperties

protected void setProperties(java.util.Dictionary props)

internalGetService

protected java.lang.Object internalGetService()

getService

public java.lang.Object getService(org.osgi.framework.Bundle bundle,
                                   org.osgi.framework.ServiceRegistration registration)

ungetService

public void ungetService(org.osgi.framework.Bundle bundle,
                         org.osgi.framework.ServiceRegistration registration,
                         java.lang.Object service)

incrementActiveCalls

protected void incrementActiveCalls()

decrementActiveCalls

protected void decrementActiveCalls()

quiesce

public void quiesce(DestroyCallback destroyCallback)


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