summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x/trunk/modules/core/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'sca-java-2.x/trunk/modules/core/src/main/java')
-rw-r--r--sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/EndpointRegistryImpl.java22
1 files changed, 14 insertions, 8 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/EndpointRegistryImpl.java
index 2ad61963e0..1f845ab6c1 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/EndpointRegistryImpl.java
@@ -108,18 +108,24 @@ public class EndpointRegistryImpl implements EndpointRegistry, LifeCycleListener
if (endpointReference.getReference() != null) {
Endpoint targetEndpoint = endpointReference.getTargetEndpoint();
- for (Endpoint endpoint : endpoints) {
- // TODO: implement more complete matching
- if (matches(targetEndpoint.getURI(), endpoint.getURI())) {
- foundEndpoints.add(endpoint);
- logger.fine("Found endpoint with matching service - " + endpoint);
- }
- // else the service name doesn't match
- }
+ foundEndpoints.addAll(findEndpoint(targetEndpoint.getURI()));
}
return foundEndpoints;
}
+
+ protected List<Endpoint> findEndpoint(String uri) {
+ List<Endpoint> foundEndpoints = new ArrayList<Endpoint>();
+ for (Endpoint endpoint : endpoints) {
+ if (matches(uri, endpoint.getURI())) {
+ foundEndpoints.add(endpoint);
+ logger.fine("Found endpoint with matching service - " + endpoint);
+ }
+ // else the service name doesn't match
+ }
+ return foundEndpoints;
+ }
+
public synchronized List<EndpointReference> findEndpointReference(Endpoint endpoint) {
return null;