Return-Path: X-Original-To: apmail-tuscany-commits-archive@www.apache.org Delivered-To: apmail-tuscany-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 843554CDD for ; Sun, 15 May 2011 20:09:59 +0000 (UTC) Received: (qmail 40168 invoked by uid 500); 15 May 2011 20:09:59 -0000 Delivered-To: apmail-tuscany-commits-archive@tuscany.apache.org Received: (qmail 40146 invoked by uid 500); 15 May 2011 20:09:59 -0000 Mailing-List: contact commits-help@tuscany.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@tuscany.apache.org Delivered-To: mailing list commits@tuscany.apache.org Received: (qmail 40139 invoked by uid 99); 15 May 2011 20:09:59 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 15 May 2011 20:09:59 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 15 May 2011 20:09:57 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 4DC0823888EA; Sun, 15 May 2011 20:09:36 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit 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 -0000 To: commits@tuscany.apache.org From: antelder@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20110515200936.4DC0823888EA@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org 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 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()); + } + } }