public class ManagedServiceFactoryTracker extends BaseTracker<org.osgi.service.cm.ManagedServiceFactory>
cm
Constructor and Description |
---|
ManagedServiceFactoryTracker(ConfigurationManager cm) |
Modifier and Type | Method and Description |
---|---|
protected ConfigurationMap<?> |
createConfigurationMap(String[] pids) |
String |
getServicePid(org.osgi.framework.ServiceReference<org.osgi.service.cm.ManagedServiceFactory> service,
TargetedPID pid)
Always returns the raw PID because for a ManagedServiceFactory
the configuration's PID is automatically generated and is not a
real targeted PID.
|
void |
provideConfiguration(org.osgi.framework.ServiceReference<org.osgi.service.cm.ManagedServiceFactory> reference,
TargetedPID configPid,
TargetedPID factoryPid,
Dictionary<String,?> properties,
long revision,
ConfigurationMap<?> configs)
Updates the given service with the provided configuration.
|
void |
removeConfiguration(org.osgi.framework.ServiceReference<org.osgi.service.cm.ManagedServiceFactory> reference,
TargetedPID configPid,
TargetedPID factoryPid)
Remove the configuration indicated by the
configPid from
the service. |
addingService, getProperties, getRealService, getServices, handleCallBackError, modifiedService, removedService, ungetRealService
public ManagedServiceFactoryTracker(ConfigurationManager cm)
protected ConfigurationMap<?> createConfigurationMap(String[] pids)
createConfigurationMap
in class BaseTracker<org.osgi.service.cm.ManagedServiceFactory>
public String getServicePid(org.osgi.framework.ServiceReference<org.osgi.service.cm.ManagedServiceFactory> service, TargetedPID pid)
getServicePid
in class BaseTracker<org.osgi.service.cm.ManagedServiceFactory>
service
- The reference ot the service for which the service
PID is to be returned.pid
- The TargetedPID
for which to return the service
PID.null
if the service does not
respond to the targeted PID at all.public void provideConfiguration(org.osgi.framework.ServiceReference<org.osgi.service.cm.ManagedServiceFactory> reference, TargetedPID configPid, TargetedPID factoryPid, Dictionary<String,?> properties, long revision, ConfigurationMap<?> configs)
BaseTracker
See the implementations of this method for more information.
provideConfiguration
in class BaseTracker<org.osgi.service.cm.ManagedServiceFactory>
reference
- The reference to the service to updateconfigPid
- The targeted configuration PIDfactoryPid
- The targeted factory PID or null
for
a non-factory configurationproperties
- The configuration properties, which may be
null
if this is the provisioning call upon
service registration of a ManagedServicerevision
- The configuration revision or -1 if there is no
configuration actually to provide.configs
- The PID to configuration map for PIDs
used by the service to updateManagedServiceTracker.provideConfiguration(ServiceReference, TargetedPID, TargetedPID, Dictionary, long, ConfigurationMap)
,
provideConfiguration(ServiceReference, TargetedPID, TargetedPID, Dictionary, long, ConfigurationMap)
public void removeConfiguration(org.osgi.framework.ServiceReference<org.osgi.service.cm.ManagedServiceFactory> reference, TargetedPID configPid, TargetedPID factoryPid)
BaseTracker
configPid
from
the service.removeConfiguration
in class BaseTracker<org.osgi.service.cm.ManagedServiceFactory>
reference
- The reference to the service from which the
configuration is to be removed.configPid
- The TargetedPID
of the configurationfactoryPid
- The factory PID
of the
configuration. This may be null
for a non-factory
configuration.Copyright © 2006–2017 The Apache Software Foundation. All rights reserved.