tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From antel...@apache.org
Subject svn commit: r1103524 - /tuscany/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/EndpointRegistryImpl.java
Date Sun, 15 May 2011 20:09:36 GMT
Author: antelder
Date: Sun May 15 20:09:35 2011
New Revision: 1103524

URL: http://svn.apache.org/viewvc?rev=1103524&view=rev
Log:
Update EndpointRegistryImpl to use the new ContributionListener and the updateInstalledContribution
method

Modified:
    tuscany/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/EndpointRegistryImpl.java

Modified: tuscany/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/EndpointRegistryImpl.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/EndpointRegistryImpl.java?rev=1103524&r1=1103523&r2=1103524&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/EndpointRegistryImpl.java
(original)
+++ tuscany/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/EndpointRegistryImpl.java
Sun May 15 20:09:35 2011
@@ -37,6 +37,7 @@ import org.apache.tuscany.sca.core.Exten
 import org.apache.tuscany.sca.core.LifeCycleListener;
 import org.apache.tuscany.sca.core.UtilityExtensionPoint;
 import org.apache.tuscany.sca.runtime.BaseEndpointRegistry;
+import org.apache.tuscany.sca.runtime.ContributionListener;
 import org.apache.tuscany.sca.runtime.EndpointListener;
 import org.apache.tuscany.sca.runtime.EndpointRegistry;
 import org.apache.tuscany.sca.runtime.InstalledContribution;
@@ -205,6 +206,9 @@ public class EndpointRegistryImpl extend
 
     public void uninstallContribution(String uri) {
         installedContributions.remove(uri);
+        for (ContributionListener listener : contributionlisteners) {
+            listener.contributionRemoved(uri);
+        }
     }
 
     public List<String> getInstalledContributionURIs() {
@@ -214,4 +218,12 @@ public class EndpointRegistryImpl extend
     public InstalledContribution getInstalledContribution(String uri) {
         return installedContributions.get(uri);
     }
+
+    @Override
+    public void updateInstalledContribution(InstalledContribution ic) {
+        installedContributions.put(ic.getURI(), ic);
+        for (ContributionListener listener : contributionlisteners) {
+            listener.contributionUpdated(ic.getURI());
+        }
+    }
 }



Mime
View raw message