From d32433ef7a2b34bd30285f45724cdd158d596029 Mon Sep 17 00:00:00 2001 From: slaws Date: Fri, 20 Mar 2009 17:57:24 +0000 Subject: Remove the target name attribute from EndpointReference2 as it already holds a TargetEndpoint reference which in turns references the component from which the name can be retrieved git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@756692 13f79535-47bb-0310-9956-ffa450edef68 --- .../tuscany/sca/assembly/EndpointReference2.java | 16 +------------- ...onentReferenceEndpointReferenceBuilderImpl.java | 8 ------- .../sca/assembly/impl/EndpointReference2Impl.java | 25 +++------------------- 3 files changed, 4 insertions(+), 45 deletions(-) (limited to 'java/sca/modules/assembly') 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 13c20cd8da..a207f81727 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 @@ -78,21 +78,7 @@ public interface EndpointReference2 extends Base, PolicySubject, Cloneable { * * @param binding the resolved reference binding */ - void setBinding(Binding binding); - - /** - * Get the name of the target service that this endpoint reference refers to - * - * @return target service name - */ - String getTargetName(); - - /** - * Set the name of the target service that this endpoint reference refers to - * - * @param targetName - */ - void setTargetName(String targetName); + void setBinding(Binding binding); /** * Get the target endpoint diff --git a/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/ComponentReferenceEndpointReferenceBuilderImpl.java b/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/ComponentReferenceEndpointReferenceBuilderImpl.java index 69e13a41fa..c56541a273 100644 --- a/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/ComponentReferenceEndpointReferenceBuilderImpl.java +++ b/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/ComponentReferenceEndpointReferenceBuilderImpl.java @@ -146,7 +146,6 @@ public class ComponentReferenceEndpointReferenceBuilderImpl extends BaseBuilderI EndpointReference2 endpointRef = assemblyFactory.createEndpointReference(); endpointRef.setComponent(component); endpointRef.setReference(reference); - endpointRef.setTargetName(targetComponentService.getName()); endpointRef.setUnresolved(false); // create dummy endpoint. This will be replaced when policies @@ -214,7 +213,6 @@ public class ComponentReferenceEndpointReferenceBuilderImpl extends BaseBuilderI EndpointReference2 endpointRef = assemblyFactory.createEndpointReference(); endpointRef.setComponent(component); endpointRef.setReference(reference); - endpointRef.setTargetName(targetComponentService.getName()); endpointRef.setUnresolved(false); // create dummy endpoint. This will be replaced when policies @@ -239,7 +237,6 @@ public class ComponentReferenceEndpointReferenceBuilderImpl extends BaseBuilderI EndpointReference2 endpointRef = assemblyFactory.createEndpointReference(); endpointRef.setComponent(component); endpointRef.setReference(reference); - endpointRef.setTargetName(targetName); endpointRef.setUnresolved(true); // create an unresolved endpoint to go with it @@ -284,7 +281,6 @@ public class ComponentReferenceEndpointReferenceBuilderImpl extends BaseBuilderI EndpointReference2 endpointRef = assemblyFactory.createEndpointReference(); endpointRef.setComponent(component); endpointRef.setReference(reference); - endpointRef.setTargetName(targetComponentService.getName()); endpointRef.setUnresolved(false); // create dummy endpoint. This will be replaced when policies @@ -309,7 +305,6 @@ public class ComponentReferenceEndpointReferenceBuilderImpl extends BaseBuilderI EndpointReference2 endpointRef = assemblyFactory.createEndpointReference(); endpointRef.setComponent(component); endpointRef.setReference(reference); - endpointRef.setTargetName(targetName); endpointRef.setUnresolved(true); // create an unresolved endpoint to go with it @@ -341,7 +336,6 @@ public class ComponentReferenceEndpointReferenceBuilderImpl extends BaseBuilderI endpointRef.setComponent(component); endpointRef.setReference(reference); endpointRef.setBinding(binding); - endpointRef.setTargetName(null); endpointRef.setTargetEndpoint(null); endpointRef.setUnresolved(false); @@ -394,7 +388,6 @@ public class ComponentReferenceEndpointReferenceBuilderImpl extends BaseBuilderI endpointRef.setComponent(component); endpointRef.setReference(reference); endpointRef.setBinding(binding); - endpointRef.setTargetName(targetComponentService.getName()); endpointRef.setUnresolved(false); // create dummy endpoint. This will be replaced when policies @@ -420,7 +413,6 @@ public class ComponentReferenceEndpointReferenceBuilderImpl extends BaseBuilderI endpointRef.setComponent(component); endpointRef.setReference(reference); endpointRef.setBinding(binding); - endpointRef.setTargetName(null); endpointRef.setTargetEndpoint(null); endpointRef.setUnresolved(false); 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 e47eb1c6fe..58b80d74ec 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 @@ -46,14 +46,13 @@ public class EndpointReference2Impl implements EndpointReference2 { private Binding binding; private List policySets = new ArrayList(); private List requiredIntents = new ArrayList(); + private InterfaceContract interfaceContract; // the target of the endpoint reference - private String targetName; private Endpoint2 targetEndpoint; - private InterfaceContract interfaceContract; // private String uri; - // callback that messages across this reference + // callback endpoint that messages across this reference // will be directed toward private Endpoint2 callbackEndpoint; @@ -102,25 +101,7 @@ public class EndpointReference2Impl implements EndpointReference2 { public void setBinding(Binding binding) { this.binding = binding; } - -/* - public Binding getCallbackBinding() { - return callbackBinding; - } - - public void setCallbackBinding(Binding callbackBinding) { - this.callbackBinding = callbackBinding; - } -*/ - - public String getTargetName() { - return targetName; - } - - public void setTargetName(String targetName) { - this.targetName = targetName; - } - + public Endpoint2 getTargetEndpoint() { return targetEndpoint; } -- cgit v1.2.3