diff options
author | antelder <antelder@13f79535-47bb-0310-9956-ffa450edef68> | 2011-06-29 09:54:31 +0000 |
---|---|---|
committer | antelder <antelder@13f79535-47bb-0310-9956-ffa450edef68> | 2011-06-29 09:54:31 +0000 |
commit | 87b58b2b0ff94ac3a04b16b250e389724b88e44a (patch) | |
tree | bdcbd26a6cee274d1bcc39cc0bd1df4ed927134d /sca-java-2.x/trunk/modules | |
parent | a863b6516d460b44fdc3ebf9357c8ab7e769b13b (diff) |
Add a method to the domain registry to test if an EndpointReference is out of date
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1141028 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/modules')
2 files changed, 6 insertions, 0 deletions
diff --git a/sca-java-2.x/trunk/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/BaseDomainRegistry.java b/sca-java-2.x/trunk/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/BaseDomainRegistry.java index 934cfcf765..3d9d2cb14c 100644 --- a/sca-java-2.x/trunk/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/BaseDomainRegistry.java +++ b/sca-java-2.x/trunk/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/BaseDomainRegistry.java @@ -96,6 +96,10 @@ public abstract class BaseDomainRegistry implements DomainRegistry, LifeCycleLis } } + public boolean isOutOfDate(EndpointReference endpointReference) { + return ! findEndpoint(endpointReference).contains(endpointReference.getTargetEndpoint()); + } + public List<Endpoint> findEndpoint(EndpointReference endpointReference) { logger.fine("Find endpoint for reference - " + endpointReference); diff --git a/sca-java-2.x/trunk/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/DomainRegistry.java b/sca-java-2.x/trunk/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/DomainRegistry.java index c5f4ce43ca..c33d3c1a4b 100644 --- a/sca-java-2.x/trunk/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/DomainRegistry.java +++ b/sca-java-2.x/trunk/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/DomainRegistry.java @@ -67,6 +67,8 @@ public interface DomainRegistry { // List<EndpointReference> findEndpointReference(Endpoint endpoint); List<EndpointReference> getEndpointReferences(); + boolean isOutOfDate(EndpointReference endpointReference); + /** * Returns a list of EndpointReferences that have a URI that matches a given URI * @param uri - the URI to match |