tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sl...@apache.org
Subject svn commit: r1209150 - in /tuscany/sca-java-2.x/trunk/modules: core-spi/src/main/java/org/apache/tuscany/sca/runtime/ core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/ domain-hazelcast/src/main/java/org/apache/tuscany/sca/registry/hazelcast...
Date Thu, 01 Dec 2011 16:58:34 GMT
Author: slaws
Date: Thu Dec  1 16:58:32 2011
New Revision: 1209150

URL: http://svn.apache.org/viewvc?rev=1209150&view=rev
Log:
Add a contributionInstalled() operation to the listener interface. Completes the set. 

Modified:
    tuscany/sca-java-2.x/trunk/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/ContributionListener.java
    tuscany/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/DomainRegistryImpl.java
    tuscany/sca-java-2.x/trunk/modules/domain-hazelcast/src/main/java/org/apache/tuscany/sca/registry/hazelcast/HazelcastDomainRegistry.java
    tuscany/sca-java-2.x/trunk/modules/domain-node/src/main/java/org/apache/tuscany/sca/impl/NodeImpl.java

Modified: tuscany/sca-java-2.x/trunk/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/ContributionListener.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/ContributionListener.java?rev=1209150&r1=1209149&r2=1209150&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/ContributionListener.java
(original)
+++ tuscany/sca-java-2.x/trunk/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/ContributionListener.java
Thu Dec  1 16:58:32 2011
@@ -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);
 

Modified: tuscany/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/DomainRegistryImpl.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/DomainRegistryImpl.java?rev=1209150&r1=1209149&r2=1209150&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/DomainRegistryImpl.java
(original)
+++ tuscany/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/DomainRegistryImpl.java
Thu Dec  1 16:58:32 2011
@@ -204,6 +204,9 @@ public class DomainRegistryImpl extends 
 
     public void installContribution(ContributionDescription cd) {
         contributionDescriptions.put(cd.getURI(), cd);
+        for (ContributionListener listener : contributionlisteners) {
+            listener.contributionInstalled(cd.getURI());
+        }
     }
 
     public void uninstallContribution(String uri) {

Modified: tuscany/sca-java-2.x/trunk/modules/domain-hazelcast/src/main/java/org/apache/tuscany/sca/registry/hazelcast/HazelcastDomainRegistry.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/domain-hazelcast/src/main/java/org/apache/tuscany/sca/registry/hazelcast/HazelcastDomainRegistry.java?rev=1209150&r1=1209149&r2=1209150&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/domain-hazelcast/src/main/java/org/apache/tuscany/sca/registry/hazelcast/HazelcastDomainRegistry.java
(original)
+++ tuscany/sca-java-2.x/trunk/modules/domain-hazelcast/src/main/java/org/apache/tuscany/sca/registry/hazelcast/HazelcastDomainRegistry.java
Thu Dec  1 16:58:32 2011
@@ -143,6 +143,9 @@ public class HazelcastDomainRegistry ext
             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) {

Modified: tuscany/sca-java-2.x/trunk/modules/domain-node/src/main/java/org/apache/tuscany/sca/impl/NodeImpl.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/domain-node/src/main/java/org/apache/tuscany/sca/impl/NodeImpl.java?rev=1209150&r1=1209149&r2=1209150&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/domain-node/src/main/java/org/apache/tuscany/sca/impl/NodeImpl.java
(original)
+++ tuscany/sca-java-2.x/trunk/modules/domain-node/src/main/java/org/apache/tuscany/sca/impl/NodeImpl.java
Thu Dec  1 16:58:32 2011
@@ -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);
             }



Mime
View raw message