diff options
author | edwardsmj <edwardsmj@13f79535-47bb-0310-9956-ffa450edef68> | 2011-01-24 14:57:26 +0000 |
---|---|---|
committer | edwardsmj <edwardsmj@13f79535-47bb-0310-9956-ffa450edef68> | 2011-01-24 14:57:26 +0000 |
commit | 0232f3394601df2306b87b78cbf53e873ca74d78 (patch) | |
tree | b1e480aa3c9e16ae3d02d3a1540a92c65632ebc8 /sca-java-2.x/trunk/modules/core-spi/src | |
parent | d80d0ef30325d00d959ef0795b22b16fdf702008 (diff) |
Fixing serialization of AsyncResponseInvoker in support of async services under TUSCANY-3783
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1062814 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/modules/core-spi/src')
2 files changed, 25 insertions, 0 deletions
diff --git a/sca-java-2.x/trunk/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/BaseEndpointRegistry.java b/sca-java-2.x/trunk/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/BaseEndpointRegistry.java index 65c1f8815b..1e7e1751a6 100644 --- a/sca-java-2.x/trunk/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/BaseEndpointRegistry.java +++ b/sca-java-2.x/trunk/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/BaseEndpointRegistry.java @@ -111,6 +111,23 @@ public abstract class BaseEndpointRegistry implements EndpointRegistry, LifeCycl public List<EndpointReference> findEndpointReference(Endpoint endpoint) { return endpointreferences; } + + /** + * Returns a list of EndpointReferences that have a URI that matches a given URI + * @param uri - the URI to match + * @return a List of EndpointReferences that match the supplied URI - if there are none + * an *empty* list is returned (not null) + */ + public List<EndpointReference> findEndpointReferences( String uri ) { + List<EndpointReference> theRefs = new ArrayList<EndpointReference>(); + if( uri == null ) return theRefs; + + for( EndpointReference ref : endpointreferences ) { + if( uri.equals(ref.getURI()) ) theRefs.add(ref); + } // end for + + return theRefs; + } // end method findEndpointReference public abstract Endpoint getEndpoint(String uri); diff --git a/sca-java-2.x/trunk/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/EndpointRegistry.java b/sca-java-2.x/trunk/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/EndpointRegistry.java index 2c01eb115a..ed2d6894c0 100644 --- a/sca-java-2.x/trunk/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/EndpointRegistry.java +++ b/sca-java-2.x/trunk/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/EndpointRegistry.java @@ -63,6 +63,14 @@ public interface EndpointRegistry { void removeEndpointReference(EndpointReference endpointReference); // List<EndpointReference> findEndpointReference(Endpoint endpoint); List<EndpointReference> getEndpointReferences(); + + /** + * Returns a list of EndpointReferences that have a URI that matches a given URI + * @param uri - the URI to match + * @return a List of EndpointReferences that match the supplied URI - if there are none + * an *empty* list is returned (not null) + */ + public List<EndpointReference> findEndpointReferences( String uri ); void addListener(EndpointListener listener); void removeListener(EndpointListener listener); |