diff options
author | rfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68> | 2010-01-29 03:34:21 +0000 |
---|---|---|
committer | rfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68> | 2010-01-29 03:34:21 +0000 |
commit | 40aa7960a748c80a2465d5ca78e8f91d43296c8e (patch) | |
tree | 2a0c530c1b8142c9f62bb57c9a871280507dac64 /sca-java-2.x/trunk/modules/sca-client-rmi/src/main/java/org/apache/tuscany/sca/client/rmi | |
parent | 4f808586972a762b6781ff23dc7d939bfca172db (diff) |
Refactor the DomainRegistryFactory to be extensions of DomainRegistryFactoryExtensionPoint
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@904367 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to '')
2 files changed, 6 insertions, 7 deletions
diff --git a/sca-java-2.x/trunk/modules/sca-client-rmi/src/main/java/org/apache/tuscany/sca/client/rmi/SCAClientFactoryImpl.java b/sca-java-2.x/trunk/modules/sca-client-rmi/src/main/java/org/apache/tuscany/sca/client/rmi/SCAClientFactoryImpl.java index f949763e9b..7b83e49f0c 100644 --- a/sca-java-2.x/trunk/modules/sca-client-rmi/src/main/java/org/apache/tuscany/sca/client/rmi/SCAClientFactoryImpl.java +++ b/sca-java-2.x/trunk/modules/sca-client-rmi/src/main/java/org/apache/tuscany/sca/client/rmi/SCAClientFactoryImpl.java @@ -26,13 +26,13 @@ import java.util.List; import org.apache.tuscany.sca.assembly.Endpoint;
import org.apache.tuscany.sca.core.ExtensionPointRegistry;
-import org.apache.tuscany.sca.core.UtilityExtensionPoint;
import org.apache.tuscany.sca.node.Node;
import org.apache.tuscany.sca.node.NodeFactory;
import org.apache.tuscany.sca.node.impl.NodeFactoryImpl;
import org.apache.tuscany.sca.node.impl.NodeImpl;
import org.apache.tuscany.sca.runtime.DomainRegistryFactory;
import org.apache.tuscany.sca.runtime.EndpointRegistry;
+import org.apache.tuscany.sca.runtime.ExtensibleDomainRegistry;
import org.oasisopen.sca.NoSuchDomainException;
import org.oasisopen.sca.NoSuchServiceException;
import org.oasisopen.sca.client.SCAClientFactory;
@@ -54,9 +54,9 @@ public class SCAClientFactoryImpl extends SCAClientFactory { this.nodeFactory = (NodeFactoryImpl)NodeFactory.getInstance();
this.extensionsRegistry = nodeFactory.getExtensionPoints();
if (extensionsRegistry != null) {
- UtilityExtensionPoint utilities = extensionsRegistry.getExtensionPoint(UtilityExtensionPoint.class);
- DomainRegistryFactory domainRegistryFactory = utilities.getUtility(DomainRegistryFactory.class);
- this.endpointRegistry = domainRegistryFactory.getEndpointRegistry(getRegistryURI(), getDomainName());
+ this.extensionsRegistry = nodeFactory.getExtensionPoints();
+ DomainRegistryFactory domainRegistryFactory = new ExtensibleDomainRegistry(extensionsRegistry);
+ this.endpointRegistry = domainRegistryFactory.getEndpointRegistry(getRegistryURI(), getDomainName());
}
}
diff --git a/sca-java-2.x/trunk/modules/sca-client-rmi/src/main/java/org/apache/tuscany/sca/client/rmi/SCAClientProxyHandler.java b/sca-java-2.x/trunk/modules/sca-client-rmi/src/main/java/org/apache/tuscany/sca/client/rmi/SCAClientProxyHandler.java index b65f311da2..4648d7cdbe 100644 --- a/sca-java-2.x/trunk/modules/sca-client-rmi/src/main/java/org/apache/tuscany/sca/client/rmi/SCAClientProxyHandler.java +++ b/sca-java-2.x/trunk/modules/sca-client-rmi/src/main/java/org/apache/tuscany/sca/client/rmi/SCAClientProxyHandler.java @@ -30,7 +30,6 @@ import org.apache.tuscany.sca.assembly.EndpointReference; import org.apache.tuscany.sca.binding.rmi.provider.RMIBindingInvoker;
import org.apache.tuscany.sca.core.ExtensionPointRegistry;
import org.apache.tuscany.sca.core.FactoryExtensionPoint;
-import org.apache.tuscany.sca.core.UtilityExtensionPoint;
import org.apache.tuscany.sca.host.rmi.ExtensibleRMIHost;
import org.apache.tuscany.sca.host.rmi.RMIHost;
import org.apache.tuscany.sca.host.rmi.RMIHostExtensionPoint;
@@ -39,6 +38,7 @@ import org.apache.tuscany.sca.node.NodeFactory; import org.apache.tuscany.sca.node.impl.NodeFactoryImpl;
import org.apache.tuscany.sca.runtime.DomainRegistryFactory;
import org.apache.tuscany.sca.runtime.EndpointRegistry;
+import org.apache.tuscany.sca.runtime.ExtensibleDomainRegistry;
import org.oasisopen.sca.NoSuchServiceException;
public class SCAClientProxyHandler implements InvocationHandler {
@@ -75,8 +75,7 @@ public class SCAClientProxyHandler implements InvocationHandler { Endpoint targetEndpoint = assemblyFactory.createEndpoint();
targetEndpoint.setURI(serviceName);
endpointReference.setTargetEndpoint(targetEndpoint);
- UtilityExtensionPoint utilities = extensionsRegistry.getExtensionPoint(UtilityExtensionPoint.class);
- DomainRegistryFactory domainRegistryFactory = utilities.getUtility(DomainRegistryFactory.class);
+ DomainRegistryFactory domainRegistryFactory = new ExtensibleDomainRegistry(extensionsRegistry);
this.endpointRegistry = domainRegistryFactory.getEndpointRegistry(null, domainURI);
List<Endpoint> endpoints = endpointRegistry.findEndpoint(endpointReference);
|