public abstract class AbstractServiceReferenceRecipe extends AbstractRecipe implements org.osgi.framework.ServiceListener, SatisfiableRecipe
Modifier and Type | Class and Description |
---|---|
static class |
AbstractServiceReferenceRecipe.Listener |
SatisfiableRecipe.SatisfactionListener
Modifier and Type | Field and Description |
---|---|
protected ExtendedBlueprintContainer |
blueprintContainer |
protected List<Recipe> |
explicitDependencies |
protected String |
filter
The OSGi filter for tracking references
|
protected List<AbstractServiceReferenceRecipe.Listener> |
listeners
The list of listeners for this reference.
|
protected CollectionRecipe |
listenersRecipe |
protected ServiceReferenceMetadata |
metadata |
protected boolean |
optional |
name, prototype
Modifier | Constructor and Description |
---|---|
protected |
AbstractServiceReferenceRecipe(String name,
ExtendedBlueprintContainer blueprintContainer,
ServiceReferenceMetadata metadata,
CollectionRecipe listenersRecipe,
List<Recipe> explicitDependencies) |
Modifier and Type | Method and Description |
---|---|
protected void |
bind(org.osgi.framework.ServiceReference reference,
Object service) |
protected void |
createListeners() |
protected Object |
createProxy(Callable<Object> dispatcher,
Set<Class<?>> interfaces) |
protected void |
doStop() |
org.osgi.framework.ServiceReference |
getBestServiceReference() |
List<Recipe> |
getConstructorDependencies()
Get the list of constructor dependencies, i.e.
|
List<Recipe> |
getDependencies()
Get the list of nested recipes, i.e.
|
protected Class |
getInterfaceClass() |
CollectionRecipe |
getListenersRecipe() |
String |
getOsgiFilter() |
protected static Class |
getRuntimeClass(ServiceReferenceMetadata metadata) |
List<org.osgi.framework.ServiceReference> |
getServiceReferences() |
boolean |
isSatisfied() |
protected boolean |
isStarted() |
protected List<Class<?>> |
loadAllClasses(Iterable<String> interfaceNames) |
protected ReifiedType |
loadType(String typeName,
ClassLoader fromClassLoader) |
protected abstract void |
retrack() |
void |
serviceChanged(org.osgi.framework.ServiceEvent event) |
protected void |
setSatisfied(boolean s) |
void |
start(SatisfiableRecipe.SatisfactionListener listener) |
void |
stop() |
protected abstract void |
track(org.osgi.framework.ServiceReference reference) |
protected void |
unbind(org.osgi.framework.ServiceReference reference,
Object service) |
protected abstract void |
untrack(org.osgi.framework.ServiceReference reference) |
protected void |
updateListeners() |
addPartialObject, convert, convert, create, destroy, getName, internalCreate, isPrototype, loadClass, loadType, setPrototype, toString
protected final ExtendedBlueprintContainer blueprintContainer
protected final ServiceReferenceMetadata metadata
protected final CollectionRecipe listenersRecipe
protected final boolean optional
protected final String filter
protected List<AbstractServiceReferenceRecipe.Listener> listeners
protected AbstractServiceReferenceRecipe(String name, ExtendedBlueprintContainer blueprintContainer, ServiceReferenceMetadata metadata, CollectionRecipe listenersRecipe, List<Recipe> explicitDependencies)
public CollectionRecipe getListenersRecipe()
public void start(SatisfiableRecipe.SatisfactionListener listener)
start
in interface SatisfiableRecipe
public void stop()
stop
in interface SatisfiableRecipe
protected void doStop()
protected boolean isStarted()
public boolean isSatisfied()
isSatisfied
in interface SatisfiableRecipe
public List<Recipe> getConstructorDependencies()
Recipe
getConstructorDependencies
in interface Recipe
getConstructorDependencies
in class AbstractRecipe
public List<Recipe> getDependencies()
Recipe
getDependencies
in interface Recipe
public String getOsgiFilter()
getOsgiFilter
in interface SatisfiableRecipe
protected void createListeners()
protected ReifiedType loadType(String typeName, ClassLoader fromClassLoader)
loadType
in class AbstractRecipe
protected Object createProxy(Callable<Object> dispatcher, Set<Class<?>> interfaces) throws Exception
Exception
public void serviceChanged(org.osgi.framework.ServiceEvent event)
serviceChanged
in interface org.osgi.framework.ServiceListener
protected Class getInterfaceClass()
protected static Class getRuntimeClass(ServiceReferenceMetadata metadata)
protected void setSatisfied(boolean s)
protected abstract void track(org.osgi.framework.ServiceReference reference)
protected abstract void untrack(org.osgi.framework.ServiceReference reference)
protected abstract void retrack()
protected void updateListeners()
protected void bind(org.osgi.framework.ServiceReference reference, Object service)
protected void unbind(org.osgi.framework.ServiceReference reference, Object service)
public List<org.osgi.framework.ServiceReference> getServiceReferences()
public org.osgi.framework.ServiceReference getBestServiceReference()
Copyright © 2013. All rights reserved.