summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x/trunk/modules/core
diff options
context:
space:
mode:
authorslaws <slaws@13f79535-47bb-0310-9956-ffa450edef68>2010-12-23 13:07:30 +0000
committerslaws <slaws@13f79535-47bb-0310-9956-ffa450edef68>2010-12-23 13:07:30 +0000
commitbde31d46c8dc12f71950edad9066868d85f91435 (patch)
tree3c28cade159c8e99d97ef9f07b17e909bbbf6315 /sca-java-2.x/trunk/modules/core
parentff2090ae5396134fb0c44b90c6599ab15baf8ff8 (diff)
Bring the unknown endpoint plugin into play at build and run time.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1052258 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/modules/core')
-rw-r--r--sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/runtime/impl/EndpointReferenceBinderImpl.java42
1 files changed, 26 insertions, 16 deletions
diff --git a/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/runtime/impl/EndpointReferenceBinderImpl.java b/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/runtime/impl/EndpointReferenceBinderImpl.java
index 47c0ca4fc5..068f13f953 100644
--- a/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/runtime/impl/EndpointReferenceBinderImpl.java
+++ b/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/runtime/impl/EndpointReferenceBinderImpl.java
@@ -279,21 +279,9 @@ public class EndpointReferenceBinderImpl implements EndpointReferenceBinder {
endpointReference.getTargetEndpoint().setBinding(endpointReference.getBinding());
endpointReference.setStatus(EndpointReference.Status.RESOLVED_BINDING);
} else {
- Binding b = null;
- if (unknownEndpointHandler != null) {
- b = unknownEndpointHandler.handleUnknownEndpoint(endpointReference);
- }
- if (b != null) {
- Endpoint matchedEndpoint = new RuntimeEndpointImpl(extensionPoints);
- matchedEndpoint.setBinding(b);
- matchedEndpoint.setRemote(true);
- endpointReference.setTargetEndpoint(matchedEndpoint);
- endpointReference.setBinding(b);
- endpointReference.setUnresolved(false);
- endpointReference.setStatus(EndpointReference.Status.WIRED_TARGET_FOUND_AND_MATCHED);
- matchAudit.append("Match because the UnknownEndpointHandler provided a binding: " + b.getType() + " uri: " + b.getURI());
- matchAudit.appendSeperator();
- } else {
+ processUnknownEndpoint(endpointReference, matchAudit);
+
+ if (!endpointReference.getStatus().equals(EndpointReference.Status.WIRED_TARGET_FOUND_AND_MATCHED)){
Monitor.error(monitor,
this,
"endpoint-validation-messages",
@@ -303,7 +291,11 @@ public class EndpointReferenceBinderImpl implements EndpointReferenceBinder {
monitor.getLastProblem().toString());
}
}
- }
+ } else {
+ // it's build time so just give the UnknownEndpoint code a chance
+ // without regard for the result
+ processUnknownEndpoint(endpointReference, matchAudit);
+ }
}
logger.fine(matchAudit.toString());
@@ -366,6 +358,24 @@ public class EndpointReferenceBinderImpl implements EndpointReferenceBinder {
// System.out.println("MATCH AUDIT:" + matchAudit.toString());
}
+
+ private void processUnknownEndpoint(EndpointReference endpointReference, Audit matchAudit){
+ Binding b = null;
+ if (unknownEndpointHandler != null) {
+ b = unknownEndpointHandler.handleUnknownEndpoint(endpointReference);
+ }
+ if (b != null) {
+ Endpoint matchedEndpoint = new RuntimeEndpointImpl(extensionPoints);
+ matchedEndpoint.setBinding(b);
+ matchedEndpoint.setRemote(true);
+ endpointReference.setTargetEndpoint(matchedEndpoint);
+ endpointReference.setBinding(b);
+ endpointReference.setUnresolved(false);
+ endpointReference.setStatus(EndpointReference.Status.WIRED_TARGET_FOUND_AND_MATCHED);
+ matchAudit.append("Match because the UnknownEndpointHandler provided a binding: " + b.getType() + " uri: " + b.getURI());
+ matchAudit.appendSeperator();
+ }
+ }
/**
* Returns true if the reference has a callback