summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x/trunk/modules/core/src
diff options
context:
space:
mode:
authorantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2011-05-15 20:09:35 +0000
committerantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2011-05-15 20:09:35 +0000
commiteb9dc707b8136ff619dc83b43225691431615775 (patch)
treec61b9da55920ecab2ccc4b466c1b6e4943a78b24 /sca-java-2.x/trunk/modules/core/src
parent138dfc96f415980a991ae0a05dbdc8762fd4e0a2 (diff)
Update EndpointRegistryImpl to use the new ContributionListener and the updateInstalledContribution method
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1103524 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/modules/core/src')
-rw-r--r--sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/EndpointRegistryImpl.java12
1 files changed, 12 insertions, 0 deletions
diff --git a/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/EndpointRegistryImpl.java b/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/EndpointRegistryImpl.java
index f371cb5744..e18b96c50b 100644
--- a/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/EndpointRegistryImpl.java
+++ b/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/EndpointRegistryImpl.java
@@ -37,6 +37,7 @@ import org.apache.tuscany.sca.core.ExtensionPointRegistry;
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 extends BaseEndpointRegistry implements Endpoi
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 extends BaseEndpointRegistry implements Endpoi
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());
+ }
+ }
}