From 93240046708547db398dbe4f93583f92b19ef7f1 Mon Sep 17 00:00:00 2001 From: antelder Date: Fri, 28 Aug 2009 10:15:19 +0000 Subject: Update to add a method to check if a wire target is out of date compared to teh endpoint registry (see ML discussion 'Endpoint registry and stopping/starting nodes' git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@808838 13f79535-47bb-0310-9956-ffa450edef68 --- .../tuscany/sca/endpoint/impl/EndpointReferenceBuilderImpl.java | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'java/sca/modules/endpoint') diff --git a/java/sca/modules/endpoint/src/main/java/org/apache/tuscany/sca/endpoint/impl/EndpointReferenceBuilderImpl.java b/java/sca/modules/endpoint/src/main/java/org/apache/tuscany/sca/endpoint/impl/EndpointReferenceBuilderImpl.java index 8ad3b471e1..4c8fbc9f29 100644 --- a/java/sca/modules/endpoint/src/main/java/org/apache/tuscany/sca/endpoint/impl/EndpointReferenceBuilderImpl.java +++ b/java/sca/modules/endpoint/src/main/java/org/apache/tuscany/sca/endpoint/impl/EndpointReferenceBuilderImpl.java @@ -304,4 +304,13 @@ public class EndpointReferenceBuilderImpl implements EndpointReferenceBuilder { return true; } + public boolean isOutOfDate(EndpointReference endpointReference) { + Endpoint te = endpointReference.getTargetEndpoint(); + if (!te.isUnresolved() && te.getURI()!= null) { + List endpoints = endpointRegistry.findEndpoint(endpointReference); + return ! endpoints.contains(endpointReference.getTargetEndpoint()); + } + return false; + } + } -- cgit v1.2.3