org.apache.aries.blueprint.container
Class ReferenceRecipe

java.lang.Object
  extended by org.apache.aries.blueprint.di.AbstractRecipe
      extended by org.apache.aries.blueprint.container.AbstractServiceReferenceRecipe
          extended by org.apache.aries.blueprint.container.ReferenceRecipe
All Implemented Interfaces:
java.util.EventListener, SatisfiableRecipe, Recipe, org.osgi.framework.ServiceListener

public class ReferenceRecipe
extends AbstractServiceReferenceRecipe

A recipe to create an unary OSGi service reference. TODO: check synchronization / thread safety TODO: looks there is a potential problem if the service is unregistered between a call to ServiceDispatcher#loadObject() and when the actual invocation finish

Version:
$Rev: 1030761 $, $Date: 2010-11-03 23:48:47 +0000 (Wed, 03 Nov 2010) $

Nested Class Summary
 class ReferenceRecipe.ServiceDispatcher
           
 class ReferenceRecipe.ServiceProxyWrapper
           
 
Nested classes/interfaces inherited from class org.apache.aries.blueprint.container.AbstractServiceReferenceRecipe
AbstractServiceReferenceRecipe.Listener
 
Nested classes/interfaces inherited from interface org.apache.aries.blueprint.container.SatisfiableRecipe
SatisfiableRecipe.SatisfactionListener
 
Field Summary
 
Fields inherited from class org.apache.aries.blueprint.container.AbstractServiceReferenceRecipe
blueprintContainer, explicitDependencies, filter, listeners, listenersRecipe, optional
 
Fields inherited from class org.apache.aries.blueprint.di.AbstractRecipe
name, prototype
 
Constructor Summary
ReferenceRecipe(java.lang.String name, ExtendedBlueprintContainer blueprintContainer, ReferenceMetadata metadata, CollectionRecipe listenersRecipe, java.util.List<Recipe> explicitDependencies)
           
 
Method Summary
protected  void doStop()
           
protected  java.lang.Object internalCreate()
           
protected  void retrack()
           
protected  void track(org.osgi.framework.ServiceReference ref)
           
protected  void untrack(org.osgi.framework.ServiceReference ref)
           
 
Methods inherited from class org.apache.aries.blueprint.container.AbstractServiceReferenceRecipe
bind, createListeners, createProxy, getBestServiceReference, getConstructorDependencies, getDependencies, getInterfaceClass, getListenersRecipe, getOsgiFilter, getRuntimeClass, getServiceReferences, isSatisfied, isStarted, loadAllClasses, loadType, serviceChanged, setSatisfied, start, stop, unbind, updateListeners
 
Methods inherited from class org.apache.aries.blueprint.di.AbstractRecipe
addPartialObject, convert, convert, create, destroy, getName, isPrototype, loadClass, loadType, setPrototype, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.apache.aries.blueprint.di.Recipe
create, destroy, getName
 

Constructor Detail

ReferenceRecipe

public ReferenceRecipe(java.lang.String name,
                       ExtendedBlueprintContainer blueprintContainer,
                       ReferenceMetadata metadata,
                       CollectionRecipe listenersRecipe,
                       java.util.List<Recipe> explicitDependencies)
Method Detail

internalCreate

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

doStop

protected void doStop()
Overrides:
doStop in class AbstractServiceReferenceRecipe

retrack

protected void retrack()
Specified by:
retrack in class AbstractServiceReferenceRecipe

track

protected void track(org.osgi.framework.ServiceReference ref)
Specified by:
track in class AbstractServiceReferenceRecipe

untrack

protected void untrack(org.osgi.framework.ServiceReference ref)
Specified by:
untrack in class AbstractServiceReferenceRecipe


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