public abstract class ConfigurableCreationStrategy extends CreationStrategy
CreationStrategy
is here to ease customization of the strategy
by hiding all the reflection stuff.Constructor and Description |
---|
ConfigurableCreationStrategy() |
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
getService(org.osgi.framework.Bundle bundle,
org.osgi.framework.ServiceRegistration registration)
Method called when a bundle want to access a service.
|
protected abstract IPOJOServiceFactory |
getServiceFactory(InstanceManager manager)
User provided
CreationStrategy MUST implement this method to
provide the real iPOJO ServiceFactory instance. |
void |
onPublication(InstanceManager manager,
java.lang.String[] specifications,
java.util.Properties props)
Method called when the underlying iPOJO Service factory
is published.
|
void |
onUnpublication()
Method called when the underlying iPOJO Service factory is
un-published.
|
void |
ungetService(org.osgi.framework.Bundle bundle,
org.osgi.framework.ServiceRegistration registration,
java.lang.Object service)
Method called when a bundle release a service.
|
isGetServiceMethod, isUngetServiceMethod
public void onPublication(InstanceManager manager, java.lang.String[] specifications, java.util.Properties props)
onPublication
in class CreationStrategy
manager
- the instance managerspecifications
- the provided specificationsprops
- the service propertiesCreationStrategy.onPublication(org.apache.felix.ipojo.InstanceManager, java.lang.String[], java.util.Properties)
public void onUnpublication()
onUnpublication
in class CreationStrategy
CreationStrategy.onUnpublication()
public java.lang.Object getService(org.osgi.framework.Bundle bundle, org.osgi.framework.ServiceRegistration registration)
bundle
- the asking bundleregistration
- the service registrationServiceFactory.getService(org.osgi.framework.Bundle, org.osgi.framework.ServiceRegistration)
public void ungetService(org.osgi.framework.Bundle bundle, org.osgi.framework.ServiceRegistration registration, java.lang.Object service)
bundle
- the bundleregistration
- the service registrationservice
- the service objectServiceFactory.ungetService(org.osgi.framework.Bundle, org.osgi.framework.ServiceRegistration, java.lang.Object)
protected abstract IPOJOServiceFactory getServiceFactory(InstanceManager manager)
CreationStrategy
MUST implement this method to
provide the real iPOJO ServiceFactory instance.manager
- InstanceManager
that the factory could useIPOJOServiceFactory
Copyright © 2006-2014 The Apache Software Foundation. All Rights Reserved.