diff options
author | rfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68> | 2010-03-28 05:27:50 +0000 |
---|---|---|
committer | rfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68> | 2010-03-28 05:27:50 +0000 |
commit | 93f5929ff2d05ff05db0069667a641395706e582 (patch) | |
tree | 560e6fb00e0f3750e0cbd3548820328d43ca2cc4 /sca-java-2.x/trunk/modules/host-corba | |
parent | 316a61d28feb70e846b4b2140b798d6e85e517a2 (diff) |
Make ExtensibleCorbaHost a utility
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@928346 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/modules/host-corba')
-rw-r--r-- | sca-java-2.x/trunk/modules/host-corba/src/main/java/org/apache/tuscany/sca/host/corba/ExtensibleCorbaHost.java | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/sca-java-2.x/trunk/modules/host-corba/src/main/java/org/apache/tuscany/sca/host/corba/ExtensibleCorbaHost.java b/sca-java-2.x/trunk/modules/host-corba/src/main/java/org/apache/tuscany/sca/host/corba/ExtensibleCorbaHost.java index 7e043667a9..644682e106 100644 --- a/sca-java-2.x/trunk/modules/host-corba/src/main/java/org/apache/tuscany/sca/host/corba/ExtensibleCorbaHost.java +++ b/sca-java-2.x/trunk/modules/host-corba/src/main/java/org/apache/tuscany/sca/host/corba/ExtensibleCorbaHost.java @@ -19,6 +19,8 @@ package org.apache.tuscany.sca.host.corba; +import org.apache.tuscany.sca.core.ExtensionPointRegistry; +import org.apache.tuscany.sca.core.UtilityExtensionPoint; import org.omg.CORBA.Object; /** @@ -29,10 +31,15 @@ public class ExtensibleCorbaHost implements CorbaHost { private CorbaHostExtensionPoint hosts; - public ExtensibleCorbaHost(CorbaHostExtensionPoint chep) { - this.hosts = chep; + public ExtensibleCorbaHost(ExtensionPointRegistry registry) { + this.hosts = registry.getExtensionPoint(CorbaHostExtensionPoint.class); } - + + public static ExtensibleCorbaHost getInstance(ExtensionPointRegistry registry) { + UtilityExtensionPoint utilityExtensionPoint = registry.getExtensionPoint(UtilityExtensionPoint.class); + return utilityExtensionPoint.getUtility(ExtensibleCorbaHost.class); + } + public Object lookup(String uri) throws CorbaHostException { return getCorbaHost().lookup(uri); } |