felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pde...@apache.org
Subject svn commit: r1579059 - /felix/sandbox/pderop/dependencymanager-prototype/dm/src/dm/impl/ConfigurationDependencyImpl.java
Date Tue, 18 Mar 2014 21:41:40 GMT
Author: pderop
Date: Tue Mar 18 21:41:39 2014
New Revision: 1579059

URL: http://svn.apache.org/r1579059
Log:
Using Generic in order to put some commont methods in DependencyImpl class

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=1579059&r1=1579058&r2=1579059&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
Tue Mar 18 21:41:39 2014
@@ -14,10 +14,11 @@ import org.osgi.service.cm.ManagedServic
 import dm.ConfigurationDependency;
 import dm.PropertyMetaData;
 import dm.context.DependencyContext;
+import dm.context.Event;
 import dm.impl.metatype.MetaTypeProviderImpl;
 
 // Todo implements some methods from DependencyImpl (createCopy, etc ...)
-public class ConfigurationDependencyImpl extends DependencyImpl implements ConfigurationDependency,
ManagedService {
+public class ConfigurationDependencyImpl extends DependencyImpl<ConfigurationDependency>
implements ConfigurationDependency, ManagedService {
     private Dictionary<?,?> m_settings;
     private String m_callback = "updated";
 	private final BundleContext m_context;
@@ -25,7 +26,6 @@ public class ConfigurationDependencyImpl
 	private String m_pid;
 	private ServiceRegistration m_registration;
     private MetaTypeProviderImpl m_metaType;
-    private boolean m_propagate;
 	private final AtomicBoolean m_updateInvokedCache = new AtomicBoolean();
 
     public ConfigurationDependencyImpl() {
@@ -43,7 +43,6 @@ public class ConfigurationDependencyImpl
 	    super(prototype);
 	    m_context = prototype.m_context;
 	    m_pid = prototype.m_pid;
-	    m_propagate = prototype.m_propagate;
 	    m_callback = prototype.m_callback;
 	    m_logger = prototype.m_logger;
 	}
@@ -59,11 +58,6 @@ public class ConfigurationDependencyImpl
     }
 
     @Override
-	public boolean isPropagated() {
-		return m_propagate;
-	}
-
-    @Override
     public boolean needsInstance() {
         return true;
     }
@@ -96,12 +90,6 @@ public class ConfigurationDependencyImpl
 		m_pid = pid;
 		return this;
 	}
-
-	public ConfigurationDependency setPropagate(boolean propagate) {
-		// ensureNotActive(); TODO
-		m_propagate = propagate;
-		return this;
-	}
 		
     public String toString() {
     	return "ConfigurationDependency[" + m_pid + "]";
@@ -200,7 +188,8 @@ public class ConfigurationDependencyImpl
         }
     }
 
-    public void invokeAdd() {
+    @Override
+    public void invokeAdd(Event event) {
 		try {
 			invokeUpdated(m_settings);
 		} catch (ConfigurationException e) {
@@ -208,11 +197,13 @@ public class ConfigurationDependencyImpl
 		}
     }
 
-    public void invokeChange() {
+    @Override
+    public void invokeChange(Event event) {
         // We already did that synchronously, from our updated method
     }
 
-    public void invokeRemove() {
+    @Override
+    public void invokeRemove(Event event) {
         // The state machine is stopping us. We have to invoke updated(null).
         try {
         	m_updateInvokedCache.set(false);



Mime
View raw message