public void provideConfiguration( ServiceReference<ManagedServiceFactory> reference, TargetedPID configPid,
TargetedPID factoryPid, Dictionary<String, ?> properties, long revision, ConfigurationMap<?> configs )
{
// Get the ManagedServiceFactory and terminate here if already
// unregistered from the framework concurrently
ManagedServiceFactory service = getRealService( reference );
if (service == null) {
return;
}
// Get the Configuration-to-PID map from the parameter or from
// the service tracker. If not available, the service tracker
// already unregistered this service concurrently
if ( configs == null )
{
configs = this.getService( reference );
if ( configs == null )
{
return;
}
}
// Both the ManagedService to update and the Configuration-to-PID
// are available, so the service can be updated with the
// configuration (which may be null)
if ( configs.shallTake( configPid, factoryPid, revision ) )
{
try
{
Dictionary props = getProperties( properties, reference, configPid.toString(),
factoryPid.toString() );
service.updated( configPid.toString(), props );
configs.record( configPid, factoryPid, revision );
}
catch ( Throwable t )
{
this.handleCallBackError( t, reference, configPid );