summaryrefslogtreecommitdiffstats
path: root/java/sca/modules/assembly
diff options
context:
space:
mode:
authorrfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68>2009-06-10 23:53:13 +0000
committerrfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68>2009-06-10 23:53:13 +0000
commit6ecd6c5f7101ca2d127bbde07206f08df5f9e995 (patch)
tree411ae9977faa57a2faeb1b04f434b2e9002f41a4 /java/sca/modules/assembly
parent42292bbbe40caa8981c1beb8ae4e18726d5c309f (diff)
Add uri to Endpoint/EndpointReference
Add endpoint-tribes to the build git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@783579 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/sca/modules/assembly')
-rw-r--r--java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/Endpoint2.java11
-rw-r--r--java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/EndpointReference2.java13
-rw-r--r--java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/Endpoint2Impl.java31
-rw-r--r--java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/EndpointReference2Impl.java39
4 files changed, 60 insertions, 34 deletions
diff --git a/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/Endpoint2.java b/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/Endpoint2.java
index e2ee776d55..befd60fd95 100644
--- a/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/Endpoint2.java
+++ b/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/Endpoint2.java
@@ -33,8 +33,19 @@ import org.apache.tuscany.sca.policy.PolicySubject;
* @version $Rev$ $Date$
*/
public interface Endpoint2 extends Base, PolicySubject, Cloneable, Serializable {
+ /**
+ * Get the structural URI of the service binding
+ * @return structural URI of the service/binding
+ */
+ String getURI();
/**
+ * Set the structural URI of the service binding
+ * @param uri &lt;componentURI&gt;#service-binding(serviceName/bindingName)
+ * or &lt;componentURI&gt;#service(serviceName)
+ */
+ void setURI(String uri);
+ /**
* Supports endpoint cloning
*
* @return endpoint
diff --git a/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/EndpointReference2.java b/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/EndpointReference2.java
index 2c6d95f20b..b6ca379996 100644
--- a/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/EndpointReference2.java
+++ b/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/EndpointReference2.java
@@ -31,6 +31,19 @@ import org.apache.tuscany.sca.policy.PolicySubject;
* @version $Rev$ $Date$
*/
public interface EndpointReference2 extends Base, PolicySubject, Cloneable, Serializable {
+ /**
+ * Get the structural URI of the reference binding
+ * @return The structural URI of the reference/binding
+ */
+ String getURI();
+
+ /**
+ * Set the structural URI of the reference binding
+ * @param uri &lt;componentURI&gt;#reference-binding(referenceName/bindingName)
+ * or &lt;componentURI&gt;#reference(referenceName) if binding is not present
+ *
+ */
+ void setURI(String uri);
/**
* Supports endpoint reference cloning
diff --git a/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/Endpoint2Impl.java b/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/Endpoint2Impl.java
index 26bf3bcda6..9844a8b7b1 100644
--- a/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/Endpoint2Impl.java
+++ b/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/Endpoint2Impl.java
@@ -42,17 +42,18 @@ public class Endpoint2Impl implements Endpoint2 {
private static final long serialVersionUID = 7344399683703812593L;
protected ExtensionPointRegistry registry;
- private Boolean unresolved;
- private String componentName;
- private Component component;
- private String serviceName;
- private ComponentService service;
- private String bindingName;
- private Binding binding;
- private InterfaceContract interfaceContract;
- private List<EndpointReference2> callbackEndpointReferences = new ArrayList<EndpointReference2>();
- private List<PolicySet> policySets = new ArrayList<PolicySet>();
- private List<Intent> requiredIntents = new ArrayList<Intent>();
+ protected boolean unresolved;
+ protected String uri;
+ protected String componentName;
+ protected Component component;
+ protected String serviceName;
+ protected ComponentService service;
+ protected String bindingName;
+ protected Binding binding;
+ protected InterfaceContract interfaceContract;
+ protected List<EndpointReference2> callbackEndpointReferences = new ArrayList<EndpointReference2>();
+ protected List<PolicySet> policySets = new ArrayList<PolicySet>();
+ protected List<Intent> requiredIntents = new ArrayList<Intent>();
protected Endpoint2Impl(ExtensionPointRegistry registry) {
this.registry = registry;
@@ -184,4 +185,12 @@ public class Endpoint2Impl implements Endpoint2 {
return output;
}
+ public String getURI() {
+ return uri;
+ }
+
+ public void setURI(String uri) {
+ this.uri = uri;
+ }
+
}
diff --git a/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/EndpointReference2Impl.java b/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/EndpointReference2Impl.java
index 4514d0e64b..fa61de9bd8 100644
--- a/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/EndpointReference2Impl.java
+++ b/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/EndpointReference2Impl.java
@@ -18,10 +18,6 @@
*/
package org.apache.tuscany.sca.assembly.impl;
-import java.io.Externalizable;
-import java.io.IOException;
-import java.io.ObjectInput;
-import java.io.ObjectOutput;
import java.util.ArrayList;
import java.util.List;
@@ -42,23 +38,24 @@ import org.apache.tuscany.sca.policy.PolicySubject;
*
* @version $Rev$ $Date$
*/
-public class EndpointReference2Impl implements EndpointReference2, Externalizable {
- private ExtensionPointRegistry registry;
+public class EndpointReference2Impl implements EndpointReference2 {
+ protected ExtensionPointRegistry registry;
// this endpoint reference
- private Boolean unresolved = true;
- private Component component;
- private ComponentReference reference;
- private Binding binding;
- private List<PolicySet> policySets = new ArrayList<PolicySet>();
- private List<Intent> requiredIntents = new ArrayList<Intent>();
- private InterfaceContract interfaceContract;
+ protected boolean unresolved = true;
+ protected String uri;
+ protected Component component;
+ protected ComponentReference reference;
+ protected Binding binding;
+ protected List<PolicySet> policySets = new ArrayList<PolicySet>();
+ protected List<Intent> requiredIntents = new ArrayList<Intent>();
+ protected InterfaceContract interfaceContract;
// the target of the endpoint reference
- private Endpoint2 targetEndpoint;
+ protected Endpoint2 targetEndpoint;
// callback endpoint that messages across this reference
// will be directed toward
- private Endpoint2 callbackEndpoint;
+ protected Endpoint2 callbackEndpoint;
protected EndpointReference2Impl(ExtensionPointRegistry registry) {
this.registry = registry;
@@ -178,15 +175,11 @@ public class EndpointReference2Impl implements EndpointReference2, Externalizabl
return output;
}
- public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
- // TODO: Lookup an endpoint reference serializer utility from the UtilityExtensionPoint
- // Read the EPR from the XML document
- // See javax.xml.ws.wsaddressing.W3CEndpointReference
+ public String getURI() {
+ return uri;
}
- public void writeExternal(ObjectOutput out) throws IOException {
- // TODO: Lookup an endpoint reference serializer utility from the UtilityExtensionPoint
- // Write the EPR as XML document
- // See javax.xml.ws.wsaddressing.W3CEndpointReference
+ public void setURI(String uri) {
+ this.uri = uri;
}
}