summaryrefslogtreecommitdiffstats
path: root/branches/sca-java-1.3/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/Contract.java
diff options
context:
space:
mode:
authorslaws <slaws@13f79535-47bb-0310-9956-ffa450edef68>2008-07-23 13:13:46 +0000
committerslaws <slaws@13f79535-47bb-0310-9956-ffa450edef68>2008-07-23 13:13:46 +0000
commit5b7aa6a2feb3b46993c2a83997f55d07ef971724 (patch)
treed2a05ea71af02e44a163429b9b6fc0a18011feb4 /branches/sca-java-1.3/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/Contract.java
parentd1d66353011726ea1ce6777843d514a5cb7ca0e8 (diff)
TUSCANY-2324 - as a follow on from TUSCANY-2484 allow an interface contract to be retrieved from a reference based on the bindings that needs it. For component references information in the endpoint structure is used to find the correct interface contract. I've wrapped this in a method on the contract now though as we are not ready yet to make the endpoint structure more prominent. A piece of work is now required to make use of this information when bindings that required is are configured.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@679082 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to '')
-rw-r--r--branches/sca-java-1.3/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/Contract.java14
1 files changed, 14 insertions, 0 deletions
diff --git a/branches/sca-java-1.3/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/Contract.java b/branches/sca-java-1.3/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/Contract.java
index 55540452af..f9a62774e6 100644
--- a/branches/sca-java-1.3/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/Contract.java
+++ b/branches/sca-java-1.3/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/Contract.java
@@ -20,6 +20,7 @@ package org.apache.tuscany.sca.assembly;
import java.util.List;
+import org.apache.tuscany.sca.interfacedef.InterfaceContract;
import org.apache.tuscany.sca.policy.PolicySetAttachPoint;
/**
@@ -78,4 +79,17 @@ public interface Contract extends AbstractContract, PolicySetAttachPoint, Clonea
*/
Object clone() throws CloneNotSupportedException;
+ /**
+ * Returns the interface contract given a binding. Important in the case where
+ * a reference with multiplicity > 1 has been promoted and has it's list of
+ * resolved bindings extended by a promoting reference. Here the binding
+ * from the promoting reference may need the interface contract from the
+ * promoting reference and not the promoted reference.
+ * TODO - remove this wrinkle with better endpoint support.
+ *
+ * @param binding the binding for which the interface contract is required
+ * @return the interface contract
+ */
+ InterfaceContract getInterfaceContract(Binding binding);
+
}