summaryrefslogtreecommitdiffstats
path: root/java/sca/modules/binding-rmi-runtime/src
diff options
context:
space:
mode:
authorslaws <slaws@13f79535-47bb-0310-9956-ffa450edef68>2009-06-19 15:37:36 +0000
committerslaws <slaws@13f79535-47bb-0310-9956-ffa450edef68>2009-06-19 15:37:36 +0000
commit9b8fd2b5139dce38fdd0f032676881ac885b31ac (patch)
tree3991e1579db942202433b8e229d5160cee1ba27b /java/sca/modules/binding-rmi-runtime/src
parent7f94dc1acc9bd08d246ddeeb5f4bfd0c5e3f76b1 (diff)
TUSCANY-3101 pass EndpointReference and Endpoint in to binding providers rather than component/reference or service/binding
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@786552 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/sca/modules/binding-rmi-runtime/src')
-rw-r--r--java/sca/modules/binding-rmi-runtime/src/main/java/org/apache/tuscany/sca/binding/rmi/provider/RMIBindingProviderFactory.java14
-rw-r--r--java/sca/modules/binding-rmi-runtime/src/main/java/org/apache/tuscany/sca/binding/rmi/provider/RMIReferenceBindingProvider.java11
-rw-r--r--java/sca/modules/binding-rmi-runtime/src/main/java/org/apache/tuscany/sca/binding/rmi/provider/RMIServiceBindingProvider.java9
3 files changed, 16 insertions, 18 deletions
diff --git a/java/sca/modules/binding-rmi-runtime/src/main/java/org/apache/tuscany/sca/binding/rmi/provider/RMIBindingProviderFactory.java b/java/sca/modules/binding-rmi-runtime/src/main/java/org/apache/tuscany/sca/binding/rmi/provider/RMIBindingProviderFactory.java
index 11a03a4768..113577b5ee 100644
--- a/java/sca/modules/binding-rmi-runtime/src/main/java/org/apache/tuscany/sca/binding/rmi/provider/RMIBindingProviderFactory.java
+++ b/java/sca/modules/binding-rmi-runtime/src/main/java/org/apache/tuscany/sca/binding/rmi/provider/RMIBindingProviderFactory.java
@@ -19,6 +19,8 @@
package org.apache.tuscany.sca.binding.rmi.provider;
+import org.apache.tuscany.sca.assembly.Endpoint;
+import org.apache.tuscany.sca.assembly.EndpointReference;
import org.apache.tuscany.sca.binding.rmi.RMIBinding;
import org.apache.tuscany.sca.core.ExtensionPointRegistry;
import org.apache.tuscany.sca.host.rmi.ExtensibleRMIHost;
@@ -45,17 +47,13 @@ public class RMIBindingProviderFactory implements BindingProviderFactory<RMIBind
this.rmiHost = new ExtensibleRMIHost(rmiHosts);
}
- public ReferenceBindingProvider createReferenceBindingProvider(RuntimeComponent component,
- RuntimeComponentReference reference,
- RMIBinding binding) {
+ public ReferenceBindingProvider createReferenceBindingProvider(EndpointReference endpointReference) {
- return new RMIReferenceBindingProvider(component, reference, binding, rmiHost);
+ return new RMIReferenceBindingProvider(endpointReference, rmiHost);
}
- public ServiceBindingProvider createServiceBindingProvider(RuntimeComponent component,
- RuntimeComponentService service,
- RMIBinding binding) {
- return new RMIServiceBindingProvider(component, service, binding, rmiHost);
+ public ServiceBindingProvider createServiceBindingProvider(Endpoint endpoint) {
+ return new RMIServiceBindingProvider(endpoint, rmiHost);
}
public Class<RMIBinding> getModelType() {
diff --git a/java/sca/modules/binding-rmi-runtime/src/main/java/org/apache/tuscany/sca/binding/rmi/provider/RMIReferenceBindingProvider.java b/java/sca/modules/binding-rmi-runtime/src/main/java/org/apache/tuscany/sca/binding/rmi/provider/RMIReferenceBindingProvider.java
index 8a368a26c3..7a87beeb6c 100644
--- a/java/sca/modules/binding-rmi-runtime/src/main/java/org/apache/tuscany/sca/binding/rmi/provider/RMIReferenceBindingProvider.java
+++ b/java/sca/modules/binding-rmi-runtime/src/main/java/org/apache/tuscany/sca/binding/rmi/provider/RMIReferenceBindingProvider.java
@@ -21,6 +21,7 @@ package org.apache.tuscany.sca.binding.rmi.provider;
import java.lang.reflect.Method;
+import org.apache.tuscany.sca.assembly.EndpointReference;
import org.apache.tuscany.sca.binding.rmi.RMIBinding;
import org.apache.tuscany.sca.host.rmi.RMIHost;
import org.apache.tuscany.sca.interfacedef.InterfaceContract;
@@ -43,12 +44,10 @@ public class RMIReferenceBindingProvider implements ReferenceBindingProvider {
private RMIBinding binding;
private RMIHost rmiHost;
- public RMIReferenceBindingProvider(RuntimeComponent component,
- RuntimeComponentReference reference,
- RMIBinding binding,
- RMIHost rmiHost) {
- this.reference = reference;
- this.binding = binding;
+ public RMIReferenceBindingProvider(EndpointReference endpointReference,
+ RMIHost rmiHost) {
+ this.reference = (RuntimeComponentReference)endpointReference.getReference();
+ this.binding = (RMIBinding)endpointReference.getBinding();
this.rmiHost = rmiHost;
}
diff --git a/java/sca/modules/binding-rmi-runtime/src/main/java/org/apache/tuscany/sca/binding/rmi/provider/RMIServiceBindingProvider.java b/java/sca/modules/binding-rmi-runtime/src/main/java/org/apache/tuscany/sca/binding/rmi/provider/RMIServiceBindingProvider.java
index 25d43445ec..506c2385fb 100644
--- a/java/sca/modules/binding-rmi-runtime/src/main/java/org/apache/tuscany/sca/binding/rmi/provider/RMIServiceBindingProvider.java
+++ b/java/sca/modules/binding-rmi-runtime/src/main/java/org/apache/tuscany/sca/binding/rmi/provider/RMIServiceBindingProvider.java
@@ -32,6 +32,7 @@ import net.sf.cglib.proxy.Enhancer;
import net.sf.cglib.proxy.MethodInterceptor;
import net.sf.cglib.proxy.MethodProxy;
+import org.apache.tuscany.sca.assembly.Endpoint;
import org.apache.tuscany.sca.binding.rmi.RMIBinding;
import org.apache.tuscany.sca.host.rmi.RMIHost;
import org.apache.tuscany.sca.host.rmi.RMIHostException;
@@ -60,10 +61,10 @@ public class RMIServiceBindingProvider implements ServiceBindingProvider {
private RuntimeWire wire;
private Remote rmiProxy;
- public RMIServiceBindingProvider(RuntimeComponent rc, RuntimeComponentService rcs, RMIBinding binding, RMIHost rmiHost) {
- this.component = rc;
- this.service = rcs;
- this.binding = binding;
+ public RMIServiceBindingProvider(Endpoint endpoint, RMIHost rmiHost) {
+ this.component = (RuntimeComponent)endpoint.getComponent();
+ this.service = (RuntimeComponentService)endpoint.getService();
+ this.binding = (RMIBinding)endpoint.getBinding();
this.rmiHost = rmiHost;
}