summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x/trunk
diff options
context:
space:
mode:
Diffstat (limited to 'sca-java-2.x/trunk')
-rw-r--r--sca-java-2.x/trunk/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/ContributionListener.java2
-rw-r--r--sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/DomainRegistryImpl.java3
-rw-r--r--sca-java-2.x/trunk/modules/domain-hazelcast/src/main/java/org/apache/tuscany/sca/registry/hazelcast/HazelcastDomainRegistry.java3
-rw-r--r--sca-java-2.x/trunk/modules/domain-node/src/main/java/org/apache/tuscany/sca/impl/NodeImpl.java3
4 files changed, 11 insertions, 0 deletions
diff --git a/sca-java-2.x/trunk/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/ContributionListener.java b/sca-java-2.x/trunk/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/ContributionListener.java
index d1eba27a79..8fe6539cae 100644
--- a/sca-java-2.x/trunk/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/ContributionListener.java
+++ b/sca-java-2.x/trunk/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/ContributionListener.java
@@ -22,6 +22,8 @@ package org.apache.tuscany.sca.runtime;
import java.util.EventListener;
public interface ContributionListener extends EventListener {
+
+ void contributionInstalled(String uri);
void contributionRemoved(String uri);
diff --git a/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/DomainRegistryImpl.java b/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/DomainRegistryImpl.java
index 08d71fd357..d0eb5c744e 100644
--- a/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/DomainRegistryImpl.java
+++ b/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/DomainRegistryImpl.java
@@ -204,6 +204,9 @@ public class DomainRegistryImpl extends BaseDomainRegistry implements DomainRegi
public void installContribution(ContributionDescription cd) {
contributionDescriptions.put(cd.getURI(), cd);
+ for (ContributionListener listener : contributionlisteners) {
+ listener.contributionInstalled(cd.getURI());
+ }
}
public void uninstallContribution(String uri) {
diff --git a/sca-java-2.x/trunk/modules/domain-hazelcast/src/main/java/org/apache/tuscany/sca/registry/hazelcast/HazelcastDomainRegistry.java b/sca-java-2.x/trunk/modules/domain-hazelcast/src/main/java/org/apache/tuscany/sca/registry/hazelcast/HazelcastDomainRegistry.java
index d7a31a38ef..4faf7331ac 100644
--- a/sca-java-2.x/trunk/modules/domain-hazelcast/src/main/java/org/apache/tuscany/sca/registry/hazelcast/HazelcastDomainRegistry.java
+++ b/sca-java-2.x/trunk/modules/domain-hazelcast/src/main/java/org/apache/tuscany/sca/registry/hazelcast/HazelcastDomainRegistry.java
@@ -143,6 +143,9 @@ public class HazelcastDomainRegistry extends BaseDomainRegistry implements Domai
contributionDescriptions = hazelcastInstance.getMap(domainURI + "/ContributionDescriptions");
((IMap<String, ContributionDescription>)contributionDescriptions).addEntryListener(new EntryListener<String, ContributionDescription>() {
public void entryAdded(EntryEvent<String, ContributionDescription> event) {
+ for (ContributionListener listener : contributionlisteners) {
+ listener.contributionInstalled(event.getKey());
+ }
}
public void entryRemoved(EntryEvent<String, ContributionDescription> event) {
for (ContributionListener listener : contributionlisteners) {
diff --git a/sca-java-2.x/trunk/modules/domain-node/src/main/java/org/apache/tuscany/sca/impl/NodeImpl.java b/sca-java-2.x/trunk/modules/domain-node/src/main/java/org/apache/tuscany/sca/impl/NodeImpl.java
index 9064f57533..b56765f3c5 100644
--- a/sca-java-2.x/trunk/modules/domain-node/src/main/java/org/apache/tuscany/sca/impl/NodeImpl.java
+++ b/sca-java-2.x/trunk/modules/domain-node/src/main/java/org/apache/tuscany/sca/impl/NodeImpl.java
@@ -99,6 +99,9 @@ public class NodeImpl implements Node {
extensionPointRegistry.getExtensionPoint(UtilityExtensionPoint.class).getUtility(ActiveNodes.class).getActiveNodes().add(this);
domainRegistry.addContributionListener(new ContributionListener() {
+ public void contributionInstalled(String uri) {
+ // Do nothing
+ }
public void contributionUpdated(String uri) {
unloadContribution(uri);
}