diff options
author | antelder <antelder@13f79535-47bb-0310-9956-ffa450edef68> | 2009-12-07 09:43:01 +0000 |
---|---|---|
committer | antelder <antelder@13f79535-47bb-0310-9956-ffa450edef68> | 2009-12-07 09:43:01 +0000 |
commit | 3a26e6cf2672bd64a4195af5758687fe0563d86a (patch) | |
tree | b18334c6a4efcedbe7526a16cb74cb69d676c7c1 /sca-java-2.x/trunk/modules/core/src/main | |
parent | cbd3af5c9b533f49d700847fec35213f72e697fd (diff) |
Split method into two to aid with subclass impls
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@887869 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/modules/core/src/main')
-rw-r--r-- | sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/EndpointRegistryImpl.java | 22 |
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; |