From f955360d1ac83472162e88eb9db4c3c2f1bfb94c Mon Sep 17 00:00:00 2001 From: antelder Date: Mon, 16 May 2011 07:21:58 +0000 Subject: Rename EndpointRegistry to DomainRegistry. Doing this has been brought up lots of times in the past just no one ever got around to it. It effects quite a few classes but its a relatively trivial rename and i don't think it should impact on anyone too much git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1103629 13f79535-47bb-0310-9956-ffa450edef68 --- .../impl/RemoteServiceInvocationHandler.java | 22 +++++++++++----------- .../tuscany/sca/client/impl/RuntimeUtils.java | 4 ++-- .../sca/client/impl/SCAClientFactoryImpl.java | 16 ++++++++-------- 3 files changed, 21 insertions(+), 21 deletions(-) (limited to 'sca-java-2.x/trunk/modules/sca-client-impl/src/main') diff --git a/sca-java-2.x/trunk/modules/sca-client-impl/src/main/java/org/apache/tuscany/sca/client/impl/RemoteServiceInvocationHandler.java b/sca-java-2.x/trunk/modules/sca-client-impl/src/main/java/org/apache/tuscany/sca/client/impl/RemoteServiceInvocationHandler.java index a79e4bee0a..ddab2de95b 100644 --- a/sca-java-2.x/trunk/modules/sca-client-impl/src/main/java/org/apache/tuscany/sca/client/impl/RemoteServiceInvocationHandler.java +++ b/sca-java-2.x/trunk/modules/sca-client-impl/src/main/java/org/apache/tuscany/sca/client/impl/RemoteServiceInvocationHandler.java @@ -43,7 +43,7 @@ import org.apache.tuscany.sca.interfacedef.InterfaceContract; import org.apache.tuscany.sca.interfacedef.InvalidInterfaceException; import org.apache.tuscany.sca.interfacedef.java.JavaInterface; import org.apache.tuscany.sca.interfacedef.java.JavaInterfaceFactory; -import org.apache.tuscany.sca.runtime.EndpointRegistry; +import org.apache.tuscany.sca.runtime.DomainRegistry; import org.apache.tuscany.sca.runtime.RuntimeComponent; import org.apache.tuscany.sca.runtime.RuntimeComponentReference; import org.apache.tuscany.sca.runtime.RuntimeEndpointReference; @@ -64,7 +64,7 @@ public class RemoteServiceInvocationHandler implements InvocationHandler { private Class serviceInterface; private ExtensionPointRegistry extensionsRegistry; - private EndpointRegistry endpointRegistry; + private DomainRegistry domainRegistry; private InvocationHandler handler; private boolean reuse; @@ -72,10 +72,10 @@ public class RemoteServiceInvocationHandler implements InvocationHandler { /** * Constructor for when there is an existing Tuscany runtime for the domain */ - public RemoteServiceInvocationHandler(ExtensionPointRegistry extensionsRegistry, EndpointRegistry endpointRegistry, String serviceName, Class serviceInterface) { + public RemoteServiceInvocationHandler(ExtensionPointRegistry extensionsRegistry, DomainRegistry domainRegistry, String serviceName, Class serviceInterface) { this.extensionsRegistry = extensionsRegistry; - this.endpointRegistry = endpointRegistry; - this.domainURI = endpointRegistry.getDomainURI(); + this.domainRegistry = domainRegistry; + this.domainURI = domainRegistry.getDomainURI(); this.serviceName = serviceName; this.serviceInterface = serviceInterface; this.reuse = true; @@ -86,9 +86,9 @@ public class RemoteServiceInvocationHandler implements InvocationHandler { * @param endpointRegistry2 * @param extensionPointRegistry */ - public RemoteServiceInvocationHandler(ExtensionPointRegistry extensionsRegistry, EndpointRegistry endpointRegistry, String domainURI, String serviceName, Class serviceInterface) throws NoSuchDomainException { + public RemoteServiceInvocationHandler(ExtensionPointRegistry extensionsRegistry, DomainRegistry domainRegistry, String domainURI, String serviceName, Class serviceInterface) throws NoSuchDomainException { this.extensionsRegistry = extensionsRegistry; - this.endpointRegistry = endpointRegistry; + this.domainRegistry = domainRegistry; this.domainURI = domainURI; this.serviceName = serviceName; this.serviceInterface = serviceInterface; @@ -114,8 +114,8 @@ public class RemoteServiceInvocationHandler implements InvocationHandler { if (extensionsRegistry == null) { extensionsRegistry = RuntimeUtils.createExtensionPointRegistry(); } - if (endpointRegistry == null) { - endpointRegistry = RuntimeUtils.getClientEndpointRegistry(extensionsRegistry, domainURI); + if (domainRegistry == null) { + domainRegistry = RuntimeUtils.getClientEndpointRegistry(extensionsRegistry, domainURI); } FactoryExtensionPoint factories = extensionsRegistry.getExtensionPoint(FactoryExtensionPoint.class); @@ -123,9 +123,9 @@ public class RemoteServiceInvocationHandler implements InvocationHandler { JavaInterfaceFactory javaInterfaceFactory = factories.getFactory(JavaInterfaceFactory.class); ProxyFactory proxyFactory = new ExtensibleProxyFactory(extensionsRegistry.getExtensionPoint(ProxyFactoryExtensionPoint.class)); - CompositeContext compositeContext = new CompositeContext(extensionsRegistry, endpointRegistry, null, domainURI, null, null); + CompositeContext compositeContext = new CompositeContext(extensionsRegistry, domainRegistry, null, domainURI, null, null); - List eps = endpointRegistry.findEndpoint(serviceName); + List eps = domainRegistry.findEndpoint(serviceName); if (eps == null || eps.size() < 1) { throw new NoSuchServiceException(serviceName); } diff --git a/sca-java-2.x/trunk/modules/sca-client-impl/src/main/java/org/apache/tuscany/sca/client/impl/RuntimeUtils.java b/sca-java-2.x/trunk/modules/sca-client-impl/src/main/java/org/apache/tuscany/sca/client/impl/RuntimeUtils.java index 57690de199..4e7479809f 100644 --- a/sca-java-2.x/trunk/modules/sca-client-impl/src/main/java/org/apache/tuscany/sca/client/impl/RuntimeUtils.java +++ b/sca-java-2.x/trunk/modules/sca-client-impl/src/main/java/org/apache/tuscany/sca/client/impl/RuntimeUtils.java @@ -28,7 +28,7 @@ import org.apache.tuscany.sca.core.ModuleActivatorExtensionPoint; import org.apache.tuscany.sca.core.UtilityExtensionPoint; import org.apache.tuscany.sca.core.assembly.RuntimeAssemblyFactory; import org.apache.tuscany.sca.runtime.DomainRegistryFactory; -import org.apache.tuscany.sca.runtime.EndpointRegistry; +import org.apache.tuscany.sca.runtime.DomainRegistry; import org.apache.tuscany.sca.runtime.ExtensibleDomainRegistryFactory; import org.apache.tuscany.sca.runtime.RuntimeProperties; import org.apache.tuscany.sca.work.WorkScheduler; @@ -60,7 +60,7 @@ public class RuntimeUtils { return extensionsRegistry; } - public static EndpointRegistry getClientEndpointRegistry(ExtensionPointRegistry extensionsRegistry, String domainURI) throws NoSuchDomainException { + public static DomainRegistry getClientEndpointRegistry(ExtensionPointRegistry extensionsRegistry, String domainURI) throws NoSuchDomainException { DomainRegistryFactory domainRegistryFactory = ExtensibleDomainRegistryFactory.getInstance(extensionsRegistry); String registryURI = domainURI; diff --git a/sca-java-2.x/trunk/modules/sca-client-impl/src/main/java/org/apache/tuscany/sca/client/impl/SCAClientFactoryImpl.java b/sca-java-2.x/trunk/modules/sca-client-impl/src/main/java/org/apache/tuscany/sca/client/impl/SCAClientFactoryImpl.java index 3252b900c5..0f51d472ee 100644 --- a/sca-java-2.x/trunk/modules/sca-client-impl/src/main/java/org/apache/tuscany/sca/client/impl/SCAClientFactoryImpl.java +++ b/sca-java-2.x/trunk/modules/sca-client-impl/src/main/java/org/apache/tuscany/sca/client/impl/SCAClientFactoryImpl.java @@ -27,7 +27,7 @@ import java.util.List; import org.apache.tuscany.sca.assembly.Endpoint; import org.apache.tuscany.sca.core.ExtensionPointRegistry; import org.apache.tuscany.sca.core.ExtensionPointRegistryLocator; -import org.apache.tuscany.sca.runtime.EndpointRegistry; +import org.apache.tuscany.sca.runtime.DomainRegistry; import org.apache.tuscany.sca.runtime.ExtensibleDomainRegistryFactory; import org.apache.tuscany.sca.runtime.RuntimeComponent; import org.oasisopen.sca.NoSuchDomainException; @@ -38,7 +38,7 @@ import org.oasisopen.sca.client.SCAClientFactoryFinder; public class SCAClientFactoryImpl extends SCAClientFactory { private ExtensionPointRegistry extensionPointRegistry; - private EndpointRegistry endpointRegistry; + private DomainRegistry domainRegistry; private boolean remoteClient; public static void setSCAClientFactoryFinder(SCAClientFactoryFinder factoryFinder) { @@ -54,10 +54,10 @@ public class SCAClientFactoryImpl extends SCAClientFactory { String domainURI = getDomainURI().toString(); for (ExtensionPointRegistry xpr : ExtensionPointRegistryLocator.getExtensionPointRegistries()) { ExtensibleDomainRegistryFactory drf = ExtensibleDomainRegistryFactory.getInstance(xpr); - for (EndpointRegistry epr : drf.getEndpointRegistries()) { + for (DomainRegistry epr : drf.getEndpointRegistries()) { if (domainURI.equals(epr.getDomainURI())) { this.extensionPointRegistry = xpr; - this.endpointRegistry = epr; + this.domainRegistry = epr; return; } } @@ -65,7 +65,7 @@ public class SCAClientFactoryImpl extends SCAClientFactory { remoteClient = true; extensionPointRegistry = RuntimeUtils.createExtensionPointRegistry(); - endpointRegistry = RuntimeUtils.getClientEndpointRegistry(extensionPointRegistry, domainURI); + domainRegistry = RuntimeUtils.getClientEndpointRegistry(extensionPointRegistry, domainURI); } @Override @@ -81,7 +81,7 @@ public class SCAClientFactoryImpl extends SCAClientFactory { // The service is a component in a local runtime if (!remoteClient) { - List endpoints = endpointRegistry.findEndpoint(serviceURI); + List endpoints = domainRegistry.findEndpoint(serviceURI); if (endpoints.size() < 1) { throw new NoSuchServiceException(serviceURI); } @@ -94,10 +94,10 @@ public class SCAClientFactoryImpl extends SCAClientFactory { InvocationHandler handler; if (!remoteClient) { // There is a local runtime but the service is a remote component - handler = new RemoteServiceInvocationHandler(extensionPointRegistry, endpointRegistry, serviceURI, serviceInterface); + handler = new RemoteServiceInvocationHandler(extensionPointRegistry, domainRegistry, serviceURI, serviceInterface); } else { // no local runtime - handler = new RemoteServiceInvocationHandler(extensionPointRegistry, endpointRegistry, getDomainURI().toString(), serviceURI, serviceInterface); + handler = new RemoteServiceInvocationHandler(extensionPointRegistry, domainRegistry, getDomainURI().toString(), serviceURI, serviceInterface); } return (T)Proxy.newProxyInstance(serviceInterface.getClassLoader(), new Class[]{serviceInterface}, handler); -- cgit v1.2.3