diff options
author | slaws <slaws@13f79535-47bb-0310-9956-ffa450edef68> | 2010-12-03 15:17:41 +0000 |
---|---|---|
committer | slaws <slaws@13f79535-47bb-0310-9956-ffa450edef68> | 2010-12-03 15:17:41 +0000 |
commit | 4d1e8a5032010161a569df3f03285676a3d48fb0 (patch) | |
tree | 52683958bdce93f196eba2d58b3f57f6906216b4 /sca-java-2.x/trunk/modules/binding-sca-runtime/src/main/java/org/apache/tuscany/sca | |
parent | bc010a932763d48d826851c4ad5180970fa27641 (diff) |
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
Diffstat (limited to 'sca-java-2.x/trunk/modules/binding-sca-runtime/src/main/java/org/apache/tuscany/sca')
2 files changed, 23 insertions, 3 deletions
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); + } + } |