summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x/trunk/modules/core
diff options
context:
space:
mode:
authorantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2011-05-10 14:10:55 +0000
committerantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2011-05-10 14:10:55 +0000
commit89139c0cf8474dd0b785fb312674bc6a9ed94c81 (patch)
treea71dd3588392a1e817c419903bda2e53f35c64ac /sca-java-2.x/trunk/modules/core
parent666d26cb2302724c0c4feeb656a0113de05cd2d1 (diff)
Start adding info about installed contributions to the registry so that distributed Nodes can find out about contributions
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1101468 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/modules/core')
-rw-r--r--sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/EndpointRegistryImpl.java21
1 files changed, 17 insertions, 4 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 6badcd74ef..61514df01f 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
@@ -49,6 +49,7 @@ public class EndpointRegistryImpl extends BaseEndpointRegistry implements Endpoi
private List<Endpoint> endpoints = new ArrayList<Endpoint>();
private Map<QName, Composite> runningComposites = new HashMap<QName, Composite>();
+ private Map<String, String> installedContributions = new HashMap<String, String>();
protected boolean quietLogging;
@@ -161,22 +162,18 @@ public class EndpointRegistryImpl extends BaseEndpointRegistry implements Endpoi
listeners.clear();
}
- @Override
public void addRunningComposite(Composite composite) {
runningComposites.put(composite.getName(), composite);
}
- @Override
public void removeRunningComposite(QName name) {
runningComposites.remove(name);
}
- @Override
public Composite getRunningComposite(QName name) {
return runningComposites.get(name);
}
- @Override
public List<QName> getRunningCompositeNames() {
List<QName> compositeNames = new ArrayList<QName>();
for (Composite composite : runningComposites.values()) {
@@ -185,4 +182,20 @@ public class EndpointRegistryImpl extends BaseEndpointRegistry implements Endpoi
return compositeNames;
}
+ public void installContribution(String uri, String url) {
+ installedContributions.put(uri, url);
+ }
+
+ public List<String> getInstalledContributionURIs() {
+ return new ArrayList<String>(installedContributions.keySet());
+ }
+
+ public String getInstalledContributionURL(String uri) {
+ return installedContributions.get(uri);
+ }
+
+ public void uninstallContribution(String uri) {
+ installedContributions.remove(uri);
+ }
+
}