public abstract class DependencyManagerCompat
extends java.lang.Object
Constructor and Description |
---|
DependencyManagerCompat() |
Modifier and Type | Method and Description |
---|---|
abstract AdapterComponent |
createAdapterComponent()
Creates a new adapter component.
|
Component |
createAdapterFactoryConfigurationService(java.lang.String factoryPid,
java.lang.String update,
boolean propagate,
java.lang.String heading,
java.lang.String desc,
java.lang.String localization,
PropertyMetaData[] propertiesMetaData)
Deprecated.
|
Component |
createAdapterService(java.lang.Class<?> serviceInterface,
java.lang.String serviceFilter)
Deprecated.
|
Component |
createAdapterService(java.lang.Class<?> serviceInterface,
java.lang.String serviceFilter,
java.lang.String autoConfig)
Deprecated.
|
Component |
createAdapterService(java.lang.Class<?> serviceInterface,
java.lang.String serviceFilter,
java.lang.String autoConfig,
java.lang.Object callbackInstance,
java.lang.String add,
java.lang.String change,
java.lang.String remove,
java.lang.String swap,
boolean propagate)
Deprecated.
|
Component |
createAdapterService(java.lang.Class<?> serviceInterface,
java.lang.String serviceFilter,
java.lang.String add,
java.lang.String change,
java.lang.String remove)
Deprecated.
|
Component |
createAdapterService(java.lang.Class<?> serviceInterface,
java.lang.String serviceFilter,
java.lang.String add,
java.lang.String change,
java.lang.String remove,
java.lang.String swap)
Deprecated.
|
abstract AspectComponent |
createAspectComponent()
Creates a new aspect component.
|
Component |
createAspectService(java.lang.Class<?> serviceInterface,
java.lang.String serviceFilter,
int ranking)
Deprecated.
|
Component |
createAspectService(java.lang.Class<?> serviceInterface,
java.lang.String serviceFilter,
int ranking,
java.lang.Object callbackInstance,
java.lang.String add,
java.lang.String change,
java.lang.String remove,
java.lang.String swap)
Deprecated.
|
Component |
createAspectService(java.lang.Class<?> serviceInterface,
java.lang.String serviceFilter,
int ranking,
java.lang.String autoConfig)
Deprecated.
|
Component |
createAspectService(java.lang.Class<?> serviceInterface,
java.lang.String serviceFilter,
int ranking,
java.lang.String add,
java.lang.String change,
java.lang.String remove)
Deprecated.
|
Component |
createAspectService(java.lang.Class<?> serviceInterface,
java.lang.String serviceFilter,
int ranking,
java.lang.String add,
java.lang.String change,
java.lang.String remove,
java.lang.String swap)
Deprecated.
|
Component |
createBundleAdapterService(int bundleStateMask,
java.lang.String bundleFilter,
boolean propagate)
Deprecated.
|
Component |
createBundleAdapterService(int bundleStateMask,
java.lang.String bundleFilter,
boolean propagate,
java.lang.Object callbackInstance,
java.lang.String add,
java.lang.String change,
java.lang.String remove)
Deprecated.
|
abstract BundleComponent |
createBundleComponent()
Creates a new bundle adapter.
|
abstract FactoryComponent |
createFactoryComponent()
Creates a new Factory Component.
|
Component |
createFactoryConfigurationAdapterService(java.lang.String factoryPid,
java.lang.String update,
boolean propagate)
Deprecated.
|
Component |
createFactoryConfigurationAdapterService(java.lang.String factoryPid,
java.lang.String update,
boolean propagate,
java.lang.Class<?> configType)
Deprecated.
|
Component |
createFactoryConfigurationAdapterService(java.lang.String factoryPid,
java.lang.String update,
boolean propagate,
java.lang.Object callbackInstance)
Deprecated.
|
Component |
createFactoryConfigurationAdapterService(java.lang.String factoryPid,
java.lang.String update,
boolean propagate,
java.lang.Object callbackInstance,
java.lang.Class<?> configType)
Deprecated.
|
Component |
createResourceAdapterService(java.lang.String resourceFilter,
boolean propagate,
java.lang.Object callbackInstance,
java.lang.String callbackChanged)
Deprecated.
|
Component |
createResourceAdapterService(java.lang.String resourceFilter,
boolean propagate,
java.lang.Object callbackInstance,
java.lang.String callbackSet,
java.lang.String callbackChanged)
Deprecated.
|
Component |
createResourceAdapterService(java.lang.String resourceFilter,
java.lang.Object propagateCallbackInstance,
java.lang.String propagateCallbackMethod,
java.lang.Object callbackInstance,
java.lang.String callbackChanged)
Deprecated.
|
Component |
createResourceAdapterService(java.lang.String resourceFilter,
java.lang.Object propagateCallbackInstance,
java.lang.String propagateCallbackMethod,
java.lang.Object callbackInstance,
java.lang.String callbackSet,
java.lang.String callbackChanged)
Deprecated.
|
abstract ResourceComponent |
createResourceComponent()
Creates a new resource adapter component.
|
public abstract AspectComponent createAspectComponent()
public abstract AdapterComponent createAdapterComponent()
public abstract FactoryComponent createFactoryComponent()
propagate
parameter, every public factory configuration properties
(which don't start with ".") will be propagated along with the adapter service properties.
It will also inherit all dependencies.public abstract BundleComponent createBundleComponent()
public abstract ResourceComponent createResourceComponent()
public Component createAspectService(java.lang.Class<?> serviceInterface, java.lang.String serviceFilter, int ranking, java.lang.String autoConfig)
DependencyManager.createAspectComponent()
Usage example:
manager.createAspectService(ExistingService.class, "(foo=bar)", 10, "m_service") .setImplementation(ExistingServiceAspect.class) );
serviceInterface
- the service interface to apply the aspect toserviceFilter
- the filter condition to use with the service interfaceranking
- the level used to organize the aspect chain orderingautoConfig
- the aspect implementation field name where to inject original service.
If null, any field matching the original service will be injected.public Component createAspectService(java.lang.Class<?> serviceInterface, java.lang.String serviceFilter, int ranking)
DependencyManager.createAspectComponent()
Usage example:
manager.createAspectService(ExistingService.class, "(foo=bar)", 10) .setImplementation(ExistingServiceAspect.class) );
serviceInterface
- the service interface to apply the aspect toserviceFilter
- the filter condition to use with the service interfaceranking
- the level used to organize the aspect chain orderingpublic Component createAspectService(java.lang.Class<?> serviceInterface, java.lang.String serviceFilter, int ranking, java.lang.String add, java.lang.String change, java.lang.String remove)
DependencyManager.createAspectComponent()
Usage example:
manager.createAspectService(ExistingService.class, "(foo=bar)", 10, "add", "change", "remove") .setImplementation(ExistingServiceAspect.class) );
serviceInterface
- the service interface to apply the aspect toserviceFilter
- the filter condition to use with the service interfaceranking
- the level used to organize the aspect chain orderingadd
- name of the callback method to invoke on addchange
- name of the callback method to invoke on changeremove
- name of the callback method to invoke on removepublic Component createAspectService(java.lang.Class<?> serviceInterface, java.lang.String serviceFilter, int ranking, java.lang.String add, java.lang.String change, java.lang.String remove, java.lang.String swap)
DependencyManager.createAspectComponent()
Usage example:
manager.createAspectService(ExistingService.class, "(foo=bar)", 10, "add", "change", "remove") .setImplementation(ExistingServiceAspect.class) );
serviceInterface
- the service interface to apply the aspect toserviceFilter
- the filter condition to use with the service interfaceranking
- the level used to organize the aspect chain orderingadd
- name of the callback method to invoke on addchange
- name of the callback method to invoke on changeremove
- name of the callback method to invoke on removeswap
- name of the callback method to invoke on swappublic Component createAspectService(java.lang.Class<?> serviceInterface, java.lang.String serviceFilter, int ranking, java.lang.Object callbackInstance, java.lang.String add, java.lang.String change, java.lang.String remove, java.lang.String swap)
DependencyManager.createAspectComponent()
Usage example:
manager.createAspectService(ExistingService.class, "(foo=bar)", 10, "add", "change", "remove") .setImplementation(ExistingServiceAspect.class) );
serviceInterface
- the service interface to apply the aspect toserviceFilter
- the filter condition to use with the service interfaceranking
- the level used to organize the aspect chain orderingcallbackInstance
- the instance to invoke the callbacks on, or null if the callbacks have to be invoked on the aspect itselfadd
- name of the callback method to invoke on addchange
- name of the callback method to invoke on changeremove
- name of the callback method to invoke on removeswap
- name of the callback method to invoke on swappublic Component createAdapterService(java.lang.Class<?> serviceInterface, java.lang.String serviceFilter)
DependencyManager.createAdapterComponent()
Usage example:
manager.createAdapterService(AdapteeService.class, "(foo=bar)") .setInterface(AdapterService.class, new Hashtable() {{ put("extra", "property"); }}) .setImplementation(AdapterImpl.class);
serviceInterface
- the service interface to apply the adapter toserviceFilter
- the filter condition to use with the service interfacepublic Component createAdapterService(java.lang.Class<?> serviceInterface, java.lang.String serviceFilter, java.lang.String autoConfig)
DependencyManager.createAdapterComponent()
Usage example:
manager.createAdapterService(AdapteeService.class, "(foo=bar)", "m_service") .setInterface(AdapterService.class, new Hashtable() {{ put("extra", "property"); }}) .setImplementation(AdapterImpl.class);
serviceInterface
- the service interface to apply the adapter toserviceFilter
- the filter condition to use with the service interfaceautoConfig
- the name of the member to inject the service intopublic Component createAdapterService(java.lang.Class<?> serviceInterface, java.lang.String serviceFilter, java.lang.String add, java.lang.String change, java.lang.String remove)
DependencyManager.createAdapterComponent()
Usage example:
manager.createAdapterService(AdapteeService.class, "(foo=bar)", "add", "change", "remove") .setInterface(AdapterService.class, new Hashtable() {{ put("extra", "property"); }}) .setImplementation(AdapterImpl.class);
serviceInterface
- the service interface to apply the adapter toserviceFilter
- the filter condition to use with the service interfaceadd
- name of the callback method to invoke on addchange
- name of the callback method to invoke on changeremove
- name of the callback method to invoke on removepublic Component createAdapterService(java.lang.Class<?> serviceInterface, java.lang.String serviceFilter, java.lang.String add, java.lang.String change, java.lang.String remove, java.lang.String swap)
DependencyManager.createAdapterComponent()
Usage example:
manager.createAdapterService(AdapteeService.class, "(foo=bar)", "add", "change", "remove", "swap") .setInterface(AdapterService.class, new Hashtable() {{ put("extra", "property"); }}) .setImplementation(AdapterImpl.class);
serviceInterface
- the service interface to apply the adapter toserviceFilter
- the filter condition to use with the service interfaceadd
- name of the callback method to invoke on addchange
- name of the callback method to invoke on changeremove
- name of the callback method to invoke on removeswap
- name of the callback method to invoke on swappublic Component createAdapterService(java.lang.Class<?> serviceInterface, java.lang.String serviceFilter, java.lang.String autoConfig, java.lang.Object callbackInstance, java.lang.String add, java.lang.String change, java.lang.String remove, java.lang.String swap, boolean propagate)
DependencyManager.createAdapterComponent()
Usage example:
manager.createAdapterService(AdapteeService.class, "(foo=bar)", "add", "change", "remove", "swap") .setInterface(AdapterService.class, new Hashtable() {{ put("extra", "property"); }}) .setImplementation(AdapterImpl.class);
serviceInterface
- the service interface to apply the adapter toserviceFilter
- the filter condition to use with the service interfaceautoConfig
- the name of the member to inject the service into, or null.callbackInstance
- the instance to invoke the callbacks on, or null if the callbacks have to be invoked on the adapter itselfadd
- name of the callback method to invoke on addchange
- name of the callback method to invoke on changeremove
- name of the callback method to invoke on removeswap
- name of the callback method to invoke on swappropagate
- true if the adaptee service properties should be propagated to the adapter service consumerspublic Component createFactoryConfigurationAdapterService(java.lang.String factoryPid, java.lang.String update, boolean propagate)
DependencyManager.createFactoryComponent()
propagate
parameter, every public factory configuration properties
(which don't start with ".") will be propagated along with the adapter service properties.
It will also inherit all dependencies.
The callback you specify may accept the following method signatures:
Usage example:
manager.createFactoryConfigurationAdapterService("MyFactoryPid", "update", true) // The interface to use when registering adapter .setInterface(AdapterService.class.getName(), new Hashtable() {{ put("foo", "bar"); }}) // the implementation of the adapter .setImplementation(AdapterServiceImpl.class);
factoryPid
- the pid matching the factory configurationupdate
- the adapter method name that will be notified when the factory configuration is created/updated.propagate
- true if public factory configuration should be propagated to the adapter service propertiespublic Component createFactoryConfigurationAdapterService(java.lang.String factoryPid, java.lang.String update, boolean propagate, java.lang.Object callbackInstance)
DependencyManager.createFactoryComponent()
propagate
parameter, every public factory configuration properties
(which don't start with ".") will be propagated along with the adapter service properties.
It will also inherit all dependencies.
The callback you specify may accept the following method signatures:
factoryPid
- the pid matching the factory configurationupdate
- the adapter method name that will be notified when the factory configuration is created/updated.propagate
- true if public factory configuration should be propagated to the adapter service propertiescallbackInstance
- the object on which the updated callback will be invoked.public Component createFactoryConfigurationAdapterService(java.lang.String factoryPid, java.lang.String update, boolean propagate, java.lang.Class<?> configType)
DependencyManager.createFactoryComponent()
propagate
parameter, every public factory configuration properties
(which don't start with ".") will be propagated along with the adapter service properties.
It will also inherit all dependencies.
The callback you specify may accept the following method signatures:
The ConfigurationType parameter is an implementation of the configType
argument.
factoryPid
- the pid matching the factory configurationupdate
- the adapter method name that will be notified when the factory configuration is created/updated.propagate
- true if public factory configuration should be propagated to the adapter service propertiesconfigType
- the configuration type to use instead of a dictionary. See the javadoc from ConfigurationDependency
for
more informations about type-safe configuration.ConfigurationDependency
public Component createFactoryConfigurationAdapterService(java.lang.String factoryPid, java.lang.String update, boolean propagate, java.lang.Object callbackInstance, java.lang.Class<?> configType)
DependencyManager.createFactoryComponent()
propagate
parameter, every public factory configuration properties
(which don't start with ".") will be propagated along with the adapter service properties.
It will also inherit all dependencies.
The callback you specify may accept the following method signatures:
The ConfigurationType parameter is an implementation of the configType
argument.
factoryPid
- the pid matching the factory configurationpropagate
- true if public factory configuration should be propagated to the adapter service propertiescallbackInstance
- the object on which the updated callback will be invoked.configType
- the configuration type to use instead of a dictionary. See the javadoc from ConfigurationDependency
for
more informations about type-safe configuration.public Component createAdapterFactoryConfigurationService(java.lang.String factoryPid, java.lang.String update, boolean propagate, java.lang.String heading, java.lang.String desc, java.lang.String localization, PropertyMetaData[] propertiesMetaData)
DependencyManager.createFactoryComponent()
propagate
parameter, every public factory configuration properties
(which don't start with ".") will be propagated along with the adapter service properties.
It will also inherit all dependencies.
Usage example:
PropertyMetaData[] propertiesMetaData = new PropertyMetaData[] { manager.createPropertyMetaData() .setCardinality(Integer.MAX_VALUE) .setType(String.class) .setHeading("English words") .setDescription("Declare here some valid english words") .setDefaults(new String[] {"hello", "world"}) .setId("words") }; manager.add(createFactoryConfigurationAdapterService("FactoryPid", "updated", true, // propagate CM settings "EnglishDictionary", "English dictionary configuration properties", null, propertiesMetaData) .setImplementation(Adapter.class));
factoryPid
- the pid matching the factory configurationupdate
- the adapter method name that will be notified when the factory configuration is created/updated.The following signatures are supported:
propagate
- true if public factory configuration should be propagated to the adapter service propertiesheading
- The label used to display the tab name (or section) where the properties are displayed.
Example: "Printer Service"desc
- A human readable description of the factory PID this configuration is associated with.
Example: "Configuration for the PrinterService bundle"localization
- Points to the basename of the Properties file that can localize the Meta Type informations.
The default localization base name for the properties is OSGI-INF/l10n/bundle, but can
be overridden by the manifest Bundle-Localization header (see core specification, in section Localization
on page 68). You can specify a specific localization basename file using this parameter
(e.g. "person"
will match person_du_NL.properties in the root bundle directory).propertiesMetaData
- Array of MetaData regarding configuration propertiespublic Component createBundleAdapterService(int bundleStateMask, java.lang.String bundleFilter, boolean propagate)
DependencyManager.createBundleComponent()
bundleStateMask
- the bundle state mask to applybundleFilter
- the filter to apply to the bundle manifestpropagate
- true
if properties from the bundle should be propagated to the servicepublic Component createBundleAdapterService(int bundleStateMask, java.lang.String bundleFilter, boolean propagate, java.lang.Object callbackInstance, java.lang.String add, java.lang.String change, java.lang.String remove)
DependencyManager.createBundleComponent()
bundleStateMask
- the bundle state mask to applybundleFilter
- the filter to apply to the bundle manifestpropagate
- true
if properties from the bundle should be propagated to the servicecallbackInstance
- the instance to invoke the callbacks on, or null if the callbacks have to be invoked on the adapter itselfadd
- name of the callback method to invoke on addchange
- name of the callback method to invoke on changeremove
- name of the callback method to invoke on removepublic Component createResourceAdapterService(java.lang.String resourceFilter, boolean propagate, java.lang.Object callbackInstance, java.lang.String callbackChanged)
DependencyManager.createResourceComponent()
resourceFilter
- the filter condition to use with the resourcepropagate
- true
if properties from the resource should be propagated to the servicecallbackInstance
- instance to invoke the callback oncallbackChanged
- the name of the callback methodpublic Component createResourceAdapterService(java.lang.String resourceFilter, boolean propagate, java.lang.Object callbackInstance, java.lang.String callbackSet, java.lang.String callbackChanged)
DependencyManager.createResourceComponent()
public Component createResourceAdapterService(java.lang.String resourceFilter, java.lang.Object propagateCallbackInstance, java.lang.String propagateCallbackMethod, java.lang.Object callbackInstance, java.lang.String callbackChanged)
DependencyManager.createResourceComponent()
public Component createResourceAdapterService(java.lang.String resourceFilter, java.lang.Object propagateCallbackInstance, java.lang.String propagateCallbackMethod, java.lang.Object callbackInstance, java.lang.String callbackSet, java.lang.String callbackChanged)
DependencyManager.createResourceComponent()