You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@felix.apache.org by pd...@apache.org on 2014/03/20 00:07:09 UTC

svn commit: r1579445 - /felix/sandbox/pderop/dependencymanager-prototype/dm/src/dm/impl/ConfigurationDependencyImpl.java

Author: pderop
Date: Wed Mar 19 23:07:08 2014
New Revision: 1579445

URL: http://svn.apache.org/r1579445
Log:
Added a close method in the Event interface, which is now invoked when a service is removed.
This allows to unget removed service references. (Only the ServiceEventImpl is currently implementing the close method).

Modified:
    felix/sandbox/pderop/dependencymanager-prototype/dm/src/dm/impl/ConfigurationDependencyImpl.java

Modified: felix/sandbox/pderop/dependencymanager-prototype/dm/src/dm/impl/ConfigurationDependencyImpl.java
URL: http://svn.apache.org/viewvc/felix/sandbox/pderop/dependencymanager-prototype/dm/src/dm/impl/ConfigurationDependencyImpl.java?rev=1579445&r1=1579444&r2=1579445&view=diff
==============================================================================
--- felix/sandbox/pderop/dependencymanager-prototype/dm/src/dm/impl/ConfigurationDependencyImpl.java (original)
+++ felix/sandbox/pderop/dependencymanager-prototype/dm/src/dm/impl/ConfigurationDependencyImpl.java Wed Mar 19 23:07:08 2014
@@ -21,7 +21,6 @@ import dm.impl.metatype.MetaTypeProvider
 public class ConfigurationDependencyImpl extends DependencyImpl<ConfigurationDependency> implements ConfigurationDependency, ManagedService {
     private Dictionary<?,?> m_settings;
     private String m_callback = "updated";
-	private final BundleContext m_context;
 	private final Logger m_logger;
 	private String m_pid;
 	private ServiceRegistration m_registration;
@@ -33,15 +32,13 @@ public class ConfigurationDependencyImpl
     }
     
     public ConfigurationDependencyImpl(BundleContext context, Logger logger) {
-    	super(false /* not autoconfig */);
-    	m_context = context;
+    	super(false /* not autoconfig */, context);
     	m_logger = logger;
         setRequired(true);
     }
     
 	public ConfigurationDependencyImpl(ConfigurationDependencyImpl prototype) {
 	    super(prototype);
-	    m_context = prototype.m_context;
 	    m_pid = prototype.m_pid;
 	    m_callback = prototype.m_callback;
 	    m_logger = prototype.m_logger;
@@ -112,21 +109,21 @@ public class ConfigurationDependencyImpl
     {
         createMetaTypeImpl();
         m_metaType.add(properties);
-       return this;
+        return this;
     }
 
     public ConfigurationDependency setDescription(String description)
     {
         createMetaTypeImpl();
         m_metaType.setDescription(description);
-       return this;
+        return this;
     }
 
     public ConfigurationDependency setHeading(String heading)
     {
         createMetaTypeImpl();
         m_metaType.setName(heading);
-       return this;
+        return this;
     }
     
     public ConfigurationDependency setLocalization(String path)