summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x/trunk/modules/core/src
diff options
context:
space:
mode:
authorantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2011-05-16 07:21:58 +0000
committerantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2011-05-16 07:21:58 +0000
commitf955360d1ac83472162e88eb9db4c3c2f1bfb94c (patch)
tree03165b58cff723cd3bc128f87c1b908277fe77f0 /sca-java-2.x/trunk/modules/core/src
parent4e1be687f324ef95c463b5af3769fdc84ce1c858 (diff)
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
Diffstat (limited to 'sca-java-2.x/trunk/modules/core/src')
-rw-r--r--sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/DomainRegistryImpl.java (renamed from sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/EndpointRegistryImpl.java)12
-rw-r--r--sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/LocalDomainRegistryFactory.java10
-rw-r--r--sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/RuntimeEndpointImpl.java34
-rw-r--r--sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/RuntimeEndpointReferenceImpl.java30
-rw-r--r--sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/AsyncResponseInvoker.java58
-rw-r--r--sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/runtime/impl/EndpointReferenceBinderImpl.java26
6 files changed, 85 insertions, 85 deletions
diff --git a/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/EndpointRegistryImpl.java b/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/DomainRegistryImpl.java
index e18b96c50b..6b99b77802 100644
--- a/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/EndpointRegistryImpl.java
+++ b/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/DomainRegistryImpl.java
@@ -36,18 +36,18 @@ import org.apache.tuscany.sca.assembly.Endpoint;
import org.apache.tuscany.sca.core.ExtensionPointRegistry;
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.BaseDomainRegistry;
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.DomainRegistry;
import org.apache.tuscany.sca.runtime.InstalledContribution;
import org.apache.tuscany.sca.runtime.RuntimeProperties;
/**
- * A EndpointRegistry implementation that sees registrations from the same JVM
+ * A DomainRegistry implementation that sees registrations from the same JVM
*/
-public class EndpointRegistryImpl extends BaseEndpointRegistry implements EndpointRegistry, LifeCycleListener {
- private final Logger logger = Logger.getLogger(EndpointRegistryImpl.class.getName());
+public class DomainRegistryImpl extends BaseDomainRegistry implements DomainRegistry, LifeCycleListener {
+ private final Logger logger = Logger.getLogger(DomainRegistryImpl.class.getName());
private List<Endpoint> endpoints = new ArrayList<Endpoint>();
private Map<String, Map<QName, Composite>> runningComposites = new HashMap<String, Map<QName, Composite>>();
@@ -55,7 +55,7 @@ public class EndpointRegistryImpl extends BaseEndpointRegistry implements Endpoi
protected boolean quietLogging;
- public EndpointRegistryImpl(ExtensionPointRegistry extensionPoints, String endpointRegistryURI, String domainURI) {
+ public DomainRegistryImpl(ExtensionPointRegistry extensionPoints, String endpointRegistryURI, String domainURI) {
super(extensionPoints, null, endpointRegistryURI, domainURI);
Properties runtimeProps = extensionPoints.getExtensionPoint(UtilityExtensionPoint.class).getUtility(RuntimeProperties.class).getProperties();
quietLogging = Boolean.parseBoolean(runtimeProps.getProperty(RuntimeProperties.QUIET_LOGGING));
diff --git a/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/LocalDomainRegistryFactory.java b/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/LocalDomainRegistryFactory.java
index b7d83e754a..002eb774ef 100644
--- a/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/LocalDomainRegistryFactory.java
+++ b/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/LocalDomainRegistryFactory.java
@@ -21,7 +21,7 @@ package org.apache.tuscany.sca.core.assembly.impl;
import org.apache.tuscany.sca.core.ExtensionPointRegistry;
import org.apache.tuscany.sca.runtime.BaseDomainRegistryFactory;
-import org.apache.tuscany.sca.runtime.EndpointRegistry;
+import org.apache.tuscany.sca.runtime.DomainRegistry;
/**
* The utility responsible for finding the endpoint regstry by the scheme and creating instances for the
@@ -37,10 +37,10 @@ public class LocalDomainRegistryFactory extends BaseDomainRegistryFactory {
super(registry);
}
- protected EndpointRegistry createEndpointRegistry(String endpointRegistryURI, String domainURI) {
- EndpointRegistry endpointRegistry =
- new EndpointRegistryImpl(registry, endpointRegistryURI, domainURI);
- return endpointRegistry;
+ protected DomainRegistry createEndpointRegistry(String endpointRegistryURI, String domainURI) {
+ DomainRegistry domainRegistry =
+ new DomainRegistryImpl(registry, endpointRegistryURI, domainURI);
+ return domainRegistry;
}
public String[] getSupportedSchemes() {
diff --git a/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/RuntimeEndpointImpl.java b/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/RuntimeEndpointImpl.java
index adad30c778..8e04a6ae47 100644
--- a/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/RuntimeEndpointImpl.java
+++ b/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/RuntimeEndpointImpl.java
@@ -95,7 +95,7 @@ import org.apache.tuscany.sca.provider.PolicyProviderFactory;
import org.apache.tuscany.sca.provider.ProviderFactoryExtensionPoint;
import org.apache.tuscany.sca.provider.ServiceBindingProvider;
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.EndpointSerializer;
import org.apache.tuscany.sca.runtime.ExtensibleDomainRegistryFactory;
import org.apache.tuscany.sca.runtime.RuntimeComponent;
@@ -181,9 +181,9 @@ public class RuntimeEndpointImpl extends EndpointImpl implements RuntimeEndpoint
bind(compositeContext.getExtensionPointRegistry(), compositeContext.getEndpointRegistry());
}
- public void bind(ExtensionPointRegistry registry, EndpointRegistry endpointRegistry) {
+ public void bind(ExtensionPointRegistry registry, DomainRegistry domainRegistry) {
if (compositeContext == null) {
- compositeContext = new CompositeContext(registry, endpointRegistry);
+ compositeContext = new CompositeContext(registry, domainRegistry);
}
// if interfaceContractMapper is already initialized then all the rest will be too
@@ -435,8 +435,8 @@ public class RuntimeEndpointImpl extends EndpointImpl implements RuntimeEndpoint
// Store the new callback EPR into the Endpoint
this.getCallbackEndpointReferences().add(asyncEPR);
- // Also store the callback EPR into the EndpointRegistry
- EndpointRegistry epReg = getEndpointRegistry( registry );
+ // Also store the callback EPR into the DomainRegistry
+ DomainRegistry epReg = getEndpointRegistry( registry );
if( epReg != null ) epReg.addEndpointReference(asyncEPR);
} // end method createAsyncServerCallback
@@ -931,7 +931,7 @@ public class RuntimeEndpointImpl extends EndpointImpl implements RuntimeEndpoint
this.interfaceContractMapper = utilities.getUtility(InterfaceContractMapper.class);
this.serializer = utilities.getUtility(EndpointSerializer.class);
RuntimeEndpointImpl ep = (RuntimeEndpointImpl)serializer.readEndpoint(xml);
- // Find the actual Endpoint in the EndpointRegistry
+ // Find the actual Endpoint in the DomainRegistry
ep = findActualEP( ep, registry );
if( ep != null ){
copyFrom( ep );
@@ -943,19 +943,19 @@ public class RuntimeEndpointImpl extends EndpointImpl implements RuntimeEndpoint
} // end method resolve
/**
- * Find the actual Endpoint in the EndpointRegistry which corresponds to the configuration described
+ * Find the actual Endpoint in the DomainRegistry which corresponds to the configuration described
* in a deserialized Endpoint
* @param ep The deserialized endpoint
* @param registry - the main extension point Registry
- * @return the corresponding Endpoint from the EndpointRegistry, or null if no match can be found
+ * @return the corresponding Endpoint from the DomainRegistry, or null if no match can be found
*/
private RuntimeEndpointImpl findActualEP(RuntimeEndpointImpl ep,
ExtensionPointRegistry registry) {
- EndpointRegistry endpointRegistry = getEndpointRegistry( registry );
+ DomainRegistry domainRegistry = getEndpointRegistry( registry );
- if( endpointRegistry == null ) return null;
+ if( domainRegistry == null ) return null;
- for( Endpoint endpoint : endpointRegistry.findEndpoint(ep.getURI()) ) {
+ for( Endpoint endpoint : domainRegistry.findEndpoint(ep.getURI()) ) {
// TODO: For the present, simply return the first matching endpoint
return (RuntimeEndpointImpl) endpoint;
} // end for
@@ -964,19 +964,19 @@ public class RuntimeEndpointImpl extends EndpointImpl implements RuntimeEndpoint
} // end method findActualEP
/**
- * Get the EndpointRegistry
+ * Get the DomainRegistry
* @param registry - the ExtensionPoint registry
- * @return the EndpointRegistry - will be null if the EndpointRegistry cannot be found
+ * @return the DomainRegistry - will be null if the DomainRegistry cannot be found
*/
- private EndpointRegistry getEndpointRegistry( ExtensionPointRegistry registry) {
+ private DomainRegistry getEndpointRegistry( ExtensionPointRegistry registry) {
DomainRegistryFactory domainRegistryFactory = ExtensibleDomainRegistryFactory.getInstance(registry);
if( domainRegistryFactory == null ) return null;
- // TODO: For the moment, just use the first (and only!) EndpointRegistry...
- EndpointRegistry endpointRegistry = (EndpointRegistry) domainRegistryFactory.getEndpointRegistries().toArray()[0];
+ // TODO: For the moment, just use the first (and only!) DomainRegistry...
+ DomainRegistry domainRegistry = (DomainRegistry) domainRegistryFactory.getEndpointRegistries().toArray()[0];
- return endpointRegistry;
+ return domainRegistry;
} // end method
public InterfaceContract getBindingInterfaceContract() {
diff --git a/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/RuntimeEndpointReferenceImpl.java b/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/RuntimeEndpointReferenceImpl.java
index 410056628b..e990231841 100644
--- a/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/RuntimeEndpointReferenceImpl.java
+++ b/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/RuntimeEndpointReferenceImpl.java
@@ -81,7 +81,7 @@ import org.apache.tuscany.sca.provider.ProviderFactoryExtensionPoint;
import org.apache.tuscany.sca.provider.ReferenceBindingProvider;
import org.apache.tuscany.sca.runtime.DomainRegistryFactory;
import org.apache.tuscany.sca.runtime.EndpointReferenceBinder;
-import org.apache.tuscany.sca.runtime.EndpointRegistry;
+import org.apache.tuscany.sca.runtime.DomainRegistry;
import org.apache.tuscany.sca.runtime.EndpointSerializer;
import org.apache.tuscany.sca.runtime.ExtensibleDomainRegistryFactory;
import org.apache.tuscany.sca.runtime.RuntimeComponent;
@@ -104,7 +104,7 @@ public class RuntimeEndpointReferenceImpl extends EndpointReferenceImpl implemen
private transient PhaseManager phaseManager;
private transient MessageFactory messageFactory;
private transient RuntimeInvoker invoker;
- private transient EndpointRegistry endpointRegistry;
+ private transient DomainRegistry domainRegistry;
private transient List<InvocationChain> chains;
private transient Map<Operation, InvocationChain> invocationChainMap =
@@ -173,12 +173,12 @@ public class RuntimeEndpointReferenceImpl extends EndpointReferenceImpl implemen
bind(compositeContext.getExtensionPointRegistry(), compositeContext.getEndpointRegistry());
}
- public void bind(ExtensionPointRegistry registry, EndpointRegistry endpointRegistry) {
+ public void bind(ExtensionPointRegistry registry, DomainRegistry domainRegistry) {
if (compositeContext == null) {
- compositeContext = new CompositeContext(registry, endpointRegistry);
+ compositeContext = new CompositeContext(registry, domainRegistry);
}
this.registry = registry;
- this.endpointRegistry = endpointRegistry;
+ this.domainRegistry = domainRegistry;
UtilityExtensionPoint utilities = registry.getExtensionPoint(UtilityExtensionPoint.class);
this.eprBinder = utilities.getUtility(EndpointReferenceBinder.class);
this.interfaceContractMapper = utilities.getUtility(InterfaceContractMapper.class);
@@ -427,7 +427,7 @@ public class RuntimeEndpointReferenceImpl extends EndpointReferenceImpl implemen
private void resolveEndpointReference() {
resolve();
- eprBinder.bindRunTime(endpointRegistry, this);
+ eprBinder.bindRunTime(domainRegistry, this);
// start the binding provider
final ReferenceBindingProvider bindingProvider = getBindingProvider();
@@ -539,7 +539,7 @@ public class RuntimeEndpointReferenceImpl extends EndpointReferenceImpl implemen
public boolean isOutOfDate() {
resolve();
- return eprBinder.isOutOfDate(endpointRegistry, this);
+ return eprBinder.isOutOfDate(domainRegistry, this);
}
public synchronized ReferenceBindingProvider getBindingProvider() {
@@ -648,7 +648,7 @@ public class RuntimeEndpointReferenceImpl extends EndpointReferenceImpl implemen
UtilityExtensionPoint utilities = registry.getExtensionPoint(UtilityExtensionPoint.class);
this.serializer = utilities.getUtility(EndpointSerializer.class);
RuntimeEndpointReferenceImpl epr = (RuntimeEndpointReferenceImpl)serializer.readEndpointReference(xml);
- // Find the actual Endpoint in the EndpointRegistry
+ // Find the actual Endpoint in the DomainRegistry
epr = findActualEPR( epr, registry );
if( epr != null ){
copyFrom( epr );
@@ -660,23 +660,23 @@ public class RuntimeEndpointReferenceImpl extends EndpointReferenceImpl implemen
} // end method resolve
/**
- * Find the actual EndpointReference in the EndpointRegistry which corresponds to the configuration described
+ * Find the actual EndpointReference in the DomainRegistry which corresponds to the configuration described
* in a deserialized EndpointReference
* @param ep The deserialized endpointReference
* @param registry - the main extension point Registry
- * @return the corresponding EndpointReference from the EndpointRegistry, or null if no match can be found
+ * @return the corresponding EndpointReference from the DomainRegistry, or null if no match can be found
*/
private RuntimeEndpointReferenceImpl findActualEPR(RuntimeEndpointReferenceImpl epr,
ExtensionPointRegistry registry) {
- // Get the EndpointRegistry
+ // Get the DomainRegistry
DomainRegistryFactory domainRegistryFactory = ExtensibleDomainRegistryFactory.getInstance(registry);
if( domainRegistryFactory == null ) return null;
- // TODO: For the moment, just use the first (and only!) EndpointRegistry...
- EndpointRegistry endpointRegistry = (EndpointRegistry) domainRegistryFactory.getEndpointRegistries().toArray()[0];
- if( endpointRegistry == null ) return null;
+ // TODO: For the moment, just use the first (and only!) DomainRegistry...
+ DomainRegistry domainRegistry = (DomainRegistry) domainRegistryFactory.getEndpointRegistries().toArray()[0];
+ if( domainRegistry == null ) return null;
- for( EndpointReference epReference : endpointRegistry.getEndpointReferences() ) {
+ for( EndpointReference epReference : domainRegistry.getEndpointReferences() ) {
// TODO: For the present, simply return the first matching endpointReference
if( epReference.getURI().equals(epr.getURI()) ) {
return (RuntimeEndpointReferenceImpl) epReference;
diff --git a/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/AsyncResponseInvoker.java b/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/AsyncResponseInvoker.java
index 87b8da62a9..1ebc9c633a 100644
--- a/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/AsyncResponseInvoker.java
+++ b/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/AsyncResponseInvoker.java
@@ -37,7 +37,7 @@ import org.apache.tuscany.sca.invocation.Message;
import org.apache.tuscany.sca.invocation.MessageFactory;
import org.apache.tuscany.sca.provider.EndpointAsyncProvider;
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.RuntimeEndpoint;
import org.apache.tuscany.sca.runtime.RuntimeEndpointReference;
@@ -70,7 +70,7 @@ public class AsyncResponseInvoker<T> implements InvokerAsyncResponse, Serializab
private String endpointReferenceURI;
private String domainURI;
- private transient EndpointRegistry endpointRegistry;
+ private transient DomainRegistry domainRegistry;
private transient ExtensionPointRegistry registry;
public AsyncResponseInvoker(RuntimeEndpoint requestEndpoint,
@@ -256,8 +256,8 @@ public class AsyncResponseInvoker<T> implements InvokerAsyncResponse, Serializab
*/
private RuntimeEndpointReference retrieveEndpointReference(String uri) {
if( uri == null ) return null;
- if( endpointRegistry == null ) return null;
- List<EndpointReference> refs = endpointRegistry.findEndpointReferences( uri );
+ if( domainRegistry == null ) return null;
+ List<EndpointReference> refs = domainRegistry.findEndpointReferences( uri );
// If there is more than EndpointReference with the uri...
if( refs.isEmpty() ) return null;
// TODO: what if there is more than 1 EPR with the given URI?
@@ -266,37 +266,37 @@ public class AsyncResponseInvoker<T> implements InvokerAsyncResponse, Serializab
/**
* Fetches the Endpoint identified by an endpoint URI
- * - the Endpoint is retrieved from the EndpointRegistry
+ * - the Endpoint is retrieved from the DomainRegistry
* @param uri - the URI of the Endpoint
* @return - the Endpoint corresponding to the URI, or null if no Endpoint is found which has the
* supplied URI
*/
private RuntimeEndpoint retrieveEndpoint(String uri) {
if( uri == null ) return null;
- if( endpointRegistry == null ) endpointRegistry = getEndpointRegistry( uri );
- if( endpointRegistry == null ) return null;
+ if( domainRegistry == null ) domainRegistry = getEndpointRegistry( uri );
+ if( domainRegistry == null ) return null;
// TODO what if more than one Endpoint gets returned??
- return (RuntimeEndpoint) endpointRegistry.findEndpoint(uri).get(0);
+ return (RuntimeEndpoint) domainRegistry.findEndpoint(uri).get(0);
} // end method retrieveEndpoint
/**
- * Gets the EndpointRegistry which contains an Endpoint with the supplied URI
+ * Gets the DomainRegistry which contains an Endpoint with the supplied URI
* @param uri - The URI of an Endpoint
- * @return - the EndpointRegistry containing the Endpoint with the supplied URI - null if no
- * such EndpointRegistry can be found
+ * @return - the DomainRegistry containing the Endpoint with the supplied URI - null if no
+ * such DomainRegistry can be found
*/
- private EndpointRegistry getEndpointRegistry(String uri) {
+ private DomainRegistry getEndpointRegistry(String uri) {
ExtensionPointRegistry registry = null;
- EndpointRegistry endpointRegistry = null;
+ DomainRegistry domainRegistry = null;
CompositeContext context = CompositeContext.getCurrentCompositeContext();
if( context == null && requestEndpoint != null ) context = requestEndpoint.getCompositeContext();
if( context != null ) {
registry = context.getExtensionPointRegistry();
- endpointRegistry = getEndpointRegistry( registry );
- if( endpointRegistry != null ) {
+ domainRegistry = getEndpointRegistry( registry );
+ if( domainRegistry != null ) {
this.registry = registry;
- return endpointRegistry;
+ return domainRegistry;
} // end if
} // end if
@@ -304,14 +304,14 @@ public class AsyncResponseInvoker<T> implements InvokerAsyncResponse, Serializab
for(ExtensionPointRegistry r : ExtensionPointRegistryLocator.getExtensionPointRegistries()) {
registry = r;
if( registry != null ) {
- // Find the actual Endpoint in the EndpointRegistry
- endpointRegistry = getEndpointRegistry( registry );
+ // Find the actual Endpoint in the DomainRegistry
+ domainRegistry = getEndpointRegistry( registry );
- if( endpointRegistry != null ) {
- for( Endpoint endpoint : endpointRegistry.findEndpoint(uri) ) {
+ if( domainRegistry != null ) {
+ for( Endpoint endpoint : domainRegistry.findEndpoint(uri) ) {
// TODO: For the present, simply return the first registry with a matching endpoint
this.registry = registry;
- return endpointRegistry;
+ return domainRegistry;
} // end for
} // end if
} // end if
@@ -321,27 +321,27 @@ public class AsyncResponseInvoker<T> implements InvokerAsyncResponse, Serializab
} // end method getEndpointRegistry
/**
- * Get the EndpointRegistry
+ * Get the DomainRegistry
* @param registry - the ExtensionPoint registry
- * @return the EndpointRegistry - will be null if the EndpointRegistry cannot be found
+ * @return the DomainRegistry - will be null if the DomainRegistry cannot be found
*/
- private EndpointRegistry getEndpointRegistry( ExtensionPointRegistry registry) {
+ private DomainRegistry getEndpointRegistry( ExtensionPointRegistry registry) {
DomainRegistryFactory domainRegistryFactory = ExtensibleDomainRegistryFactory.getInstance(registry);
if( domainRegistryFactory == null ) return null;
// Find the first endpoint registry that matches the domain name
if( domainURI != null ) {
- for( EndpointRegistry endpointRegistry : domainRegistryFactory.getEndpointRegistries() ) {
- if( domainURI.equals( endpointRegistry.getDomainURI() ) ) return endpointRegistry;
+ for( DomainRegistry domainRegistry : domainRegistryFactory.getEndpointRegistries() ) {
+ if( domainURI.equals( domainRegistry.getDomainURI() ) ) return domainRegistry;
} // end for
} // end if
- // if there was no domainName to match, simply return the first EndpointRegistry if there is one...
+ // if there was no domainName to match, simply return the first DomainRegistry if there is one...
if (domainRegistryFactory.getEndpointRegistries().size() > 0){
- EndpointRegistry endpointRegistry = (EndpointRegistry) domainRegistryFactory.getEndpointRegistries().toArray()[0];
- return endpointRegistry;
+ DomainRegistry domainRegistry = (DomainRegistry) domainRegistryFactory.getEndpointRegistries().toArray()[0];
+ return domainRegistry;
} else {
return null;
}
diff --git a/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/runtime/impl/EndpointReferenceBinderImpl.java b/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/runtime/impl/EndpointReferenceBinderImpl.java
index 068f13f953..cfdb099423 100644
--- a/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/runtime/impl/EndpointReferenceBinderImpl.java
+++ b/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/runtime/impl/EndpointReferenceBinderImpl.java
@@ -60,7 +60,7 @@ import org.apache.tuscany.sca.provider.EndpointReferenceAsyncProvider;
import org.apache.tuscany.sca.provider.ReferenceBindingProvider;
import org.apache.tuscany.sca.runtime.CompositeActivator;
import org.apache.tuscany.sca.runtime.EndpointReferenceBinder;
-import org.apache.tuscany.sca.runtime.EndpointRegistry;
+import org.apache.tuscany.sca.runtime.DomainRegistry;
import org.apache.tuscany.sca.runtime.RuntimeEndpoint;
import org.apache.tuscany.sca.runtime.RuntimeEndpointReference;
import org.apache.tuscany.sca.runtime.UnknownEndpointHandler;
@@ -110,35 +110,35 @@ public class EndpointReferenceBinderImpl implements EndpointReferenceBinder {
* Bind a single endpoint reference at build time. Here we only expect the
* registry to have a record of local endpoints
*
- * @param endpointRegistry
+ * @param domainRegistry
* @param endpointReference
*/
- public void bindBuildTime(EndpointRegistry endpointRegistry,
+ public void bindBuildTime(DomainRegistry domainRegistry,
EndpointReference endpointReference,
BuilderContext builderContext) {
- bind(endpointRegistry, endpointReference, builderContext, false);
+ bind(domainRegistry, endpointReference, builderContext, false);
}
/**
* Bind a single endpoint reference at run time. Here we expect the
* registry to be populated with endpoints from across the domain
*
- * @param endpointRegistry
+ * @param domainRegistry
* @param endpointReference
*/
- public void bindRunTime(EndpointRegistry endpointRegistry,
+ public void bindRunTime(DomainRegistry domainRegistry,
EndpointReference endpointReference) {
- bind(endpointRegistry, endpointReference, null, true);
+ bind(domainRegistry, endpointReference, null, true);
}
/**
* Bind a reference to a service endpoint
*
- * @param endpointRegistry
+ * @param domainRegistry
* @param endpointReference
* @param runtime set true if called from the runtime
*/
- public void bind(EndpointRegistry endpointRegistry,
+ public void bind(DomainRegistry domainRegistry,
EndpointReference endpointReference,
BuilderContext builderContext,
boolean runtime){
@@ -154,7 +154,7 @@ public class EndpointReferenceBinderImpl implements EndpointReferenceBinder {
// do autowire matching
// will only be called at build time at the moment
Multiplicity multiplicity = endpointReference.getReference().getMultiplicity();
- for (Endpoint endpoint : endpointRegistry.getEndpoints()){
+ for (Endpoint endpoint : domainRegistry.getEndpoints()){
// if (endpoint is in the same composite as endpoint reference){
if ((multiplicity == Multiplicity.ZERO_ONE ||
multiplicity == Multiplicity.ONE_ONE) &&
@@ -253,7 +253,7 @@ public class EndpointReferenceBinderImpl implements EndpointReferenceBinder {
// The reference is not yet matched to a service
// find the service in the endpoint registry
- List<Endpoint> endpoints = endpointRegistry.findEndpoint(endpointReference);
+ List<Endpoint> endpoints = domainRegistry.findEndpoint(endpointReference);
if (endpoints.size() > 0){
selectForwardEndpoint(endpointReference,
@@ -917,12 +917,12 @@ public class EndpointReferenceBinderImpl implements EndpointReferenceBinder {
*
* @return true is the registry has changed
*/
- public boolean isOutOfDate(EndpointRegistry endpointRegistry, EndpointReference endpointReference) {
+ public boolean isOutOfDate(DomainRegistry domainRegistry, EndpointReference endpointReference) {
Endpoint te = endpointReference.getTargetEndpoint();
if (te != null && !te.isUnresolved()
&& te.getURI() != null
&& endpointReference.getStatus() != EndpointReference.Status.RESOLVED_BINDING) {
- List<Endpoint> endpoints = endpointRegistry.findEndpoint(endpointReference);
+ List<Endpoint> endpoints = domainRegistry.findEndpoint(endpointReference);
return ! endpoints.contains(endpointReference.getTargetEndpoint());
}
return false;