From 4d1e8a5032010161a569df3f03285676a3d48fb0 Mon Sep 17 00:00:00 2001 From: slaws Date: Fri, 3 Dec 2010 15:17:41 +0000 Subject: TUSCANY-3801 - Move the SCA binding up to the new async provider interfaces. git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1041863 13f79535-47bb-0310-9956-ffa450edef68 --- .../provider/RuntimeSCAReferenceBindingProvider.java | 8 ++++++-- .../sca/provider/RuntimeSCAServiceBindingProvider.java | 18 +++++++++++++++++- 2 files changed, 23 insertions(+), 3 deletions(-) (limited to 'sca-java-2.x') diff --git a/sca-java-2.x/trunk/modules/binding-sca-runtime/src/main/java/org/apache/tuscany/sca/binding/sca/provider/RuntimeSCAReferenceBindingProvider.java b/sca-java-2.x/trunk/modules/binding-sca-runtime/src/main/java/org/apache/tuscany/sca/binding/sca/provider/RuntimeSCAReferenceBindingProvider.java index 08f2bee3b3..c36506a6c7 100644 --- a/sca-java-2.x/trunk/modules/binding-sca-runtime/src/main/java/org/apache/tuscany/sca/binding/sca/provider/RuntimeSCAReferenceBindingProvider.java +++ b/sca-java-2.x/trunk/modules/binding-sca-runtime/src/main/java/org/apache/tuscany/sca/binding/sca/provider/RuntimeSCAReferenceBindingProvider.java @@ -30,6 +30,7 @@ import org.apache.tuscany.sca.interfacedef.InterfaceContractMapper; import org.apache.tuscany.sca.interfacedef.Operation; import org.apache.tuscany.sca.invocation.InvocationChain; import org.apache.tuscany.sca.invocation.Invoker; +import org.apache.tuscany.sca.provider.EndpointReferenceAsyncProvider; import org.apache.tuscany.sca.provider.EndpointReferenceProvider; import org.apache.tuscany.sca.provider.ReferenceBindingProvider; import org.apache.tuscany.sca.runtime.RuntimeComponent; @@ -49,7 +50,7 @@ import org.oasisopen.sca.ServiceUnavailableException; * * @version $Rev$ $Date$ */ -public class RuntimeSCAReferenceBindingProvider implements EndpointReferenceProvider { +public class RuntimeSCAReferenceBindingProvider implements EndpointReferenceAsyncProvider { private RuntimeEndpointReference endpointReference; private RuntimeComponent component; @@ -209,7 +210,10 @@ public class RuntimeSCAReferenceBindingProvider implements EndpointReferenceProv if (distributedProvider instanceof EndpointReferenceProvider) { ((EndpointReferenceProvider)distributedProvider).configure(); } - + } + + public boolean supportsNativeAsync() { + return true; } } diff --git a/sca-java-2.x/trunk/modules/binding-sca-runtime/src/main/java/org/apache/tuscany/sca/binding/sca/provider/RuntimeSCAServiceBindingProvider.java b/sca-java-2.x/trunk/modules/binding-sca-runtime/src/main/java/org/apache/tuscany/sca/binding/sca/provider/RuntimeSCAServiceBindingProvider.java index 14d7284846..7c6ba9cd69 100644 --- a/sca-java-2.x/trunk/modules/binding-sca-runtime/src/main/java/org/apache/tuscany/sca/binding/sca/provider/RuntimeSCAServiceBindingProvider.java +++ b/sca-java-2.x/trunk/modules/binding-sca-runtime/src/main/java/org/apache/tuscany/sca/binding/sca/provider/RuntimeSCAServiceBindingProvider.java @@ -22,6 +22,10 @@ package org.apache.tuscany.sca.binding.sca.provider; import org.apache.tuscany.sca.core.ExtensionPointRegistry; import org.apache.tuscany.sca.core.UtilityExtensionPoint; import org.apache.tuscany.sca.interfacedef.InterfaceContract; +import org.apache.tuscany.sca.interfacedef.Operation; +import org.apache.tuscany.sca.invocation.Invoker; +import org.apache.tuscany.sca.provider.EndpointAsyncProvider; +import org.apache.tuscany.sca.provider.EndpointProvider; import org.apache.tuscany.sca.provider.ServiceBindingProvider; import org.apache.tuscany.sca.runtime.RuntimeComponentService; import org.apache.tuscany.sca.runtime.RuntimeEndpoint; @@ -34,7 +38,7 @@ import org.apache.tuscany.sca.runtime.RuntimeEndpoint; * * @version $Rev$ $Date$ */ -public class RuntimeSCAServiceBindingProvider implements ServiceBindingProvider { +public class RuntimeSCAServiceBindingProvider implements EndpointAsyncProvider { private RuntimeEndpoint endpoint; private RuntimeComponentService service; @@ -98,4 +102,16 @@ public class RuntimeSCAServiceBindingProvider implements ServiceBindingProvider } } + public void configure() { + // TODO Auto-generated method stub + } + + public boolean supportsNativeAsync() { + return true; + } + + public Invoker createAsyncResponseInvoker(Operation operation) { + return new SCABindingAsyncResponseInvoker(null, null); + } + } -- cgit v1.2.3