diff options
author | antelder <antelder@13f79535-47bb-0310-9956-ffa450edef68> | 2009-08-28 10:15:19 +0000 |
---|---|---|
committer | antelder <antelder@13f79535-47bb-0310-9956-ffa450edef68> | 2009-08-28 10:15:19 +0000 |
commit | 93240046708547db398dbe4f93583f92b19ef7f1 (patch) | |
tree | 66db51b36ade187b045b562f4cee69533cd60575 /java/sca/modules/endpoint | |
parent | 1e6dfca020c2d5bac36990da4df1b0a2a4194f6b (diff) |
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
Diffstat (limited to 'java/sca/modules/endpoint')
-rw-r--r-- | java/sca/modules/endpoint/src/main/java/org/apache/tuscany/sca/endpoint/impl/EndpointReferenceBuilderImpl.java | 9 |
1 files changed, 9 insertions, 0 deletions
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<Endpoint> endpoints = endpointRegistry.findEndpoint(endpointReference); + return ! endpoints.contains(endpointReference.getTargetEndpoint()); + } + return false; + } + } |