From 21c4fe09a85c35932b3240f3a4141849e80496da Mon Sep 17 00:00:00 2001 From: slaws Date: Thu, 9 Dec 2010 11:56:11 +0000 Subject: TUSCANY-3801 - Make the async invoker creation signature more consistent with the invoke creation signature git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1043910 13f79535-47bb-0310-9956-ffa450edef68 --- .../src/main/java/sampleasync/impl/SampleAsyncProvider.java | 9 +++------ .../src/main/java/sampleasync/impl/SampleWSDLInvoker.java | 4 +--- 2 files changed, 4 insertions(+), 9 deletions(-) (limited to 'sca-java-2.x/trunk/unreleased/samples/implementation-sample-async/src/main/java') diff --git a/sca-java-2.x/trunk/unreleased/samples/implementation-sample-async/src/main/java/sampleasync/impl/SampleAsyncProvider.java b/sca-java-2.x/trunk/unreleased/samples/implementation-sample-async/src/main/java/sampleasync/impl/SampleAsyncProvider.java index 8387285e3d..10eb78f6c8 100644 --- a/sca-java-2.x/trunk/unreleased/samples/implementation-sample-async/src/main/java/sampleasync/impl/SampleAsyncProvider.java +++ b/sca-java-2.x/trunk/unreleased/samples/implementation-sample-async/src/main/java/sampleasync/impl/SampleAsyncProvider.java @@ -24,7 +24,6 @@ import java.util.HashMap; import java.util.Map; import org.apache.tuscany.sca.assembly.ComponentReference; -import org.apache.tuscany.sca.assembly.Endpoint; import org.apache.tuscany.sca.core.ExtensionPointRegistry; import org.apache.tuscany.sca.core.invocation.ProxyFactory; import org.apache.tuscany.sca.interfacedef.Interface; @@ -88,17 +87,15 @@ class SampleAsyncProvider implements ImplementationAsyncProvider { } public Invoker createInvoker(final RuntimeComponentService s, final Operation op) { - // TODO - we're passing EP into the WSDL invoker so this isn't going to work - // properly for sync calls - return (Invoker)createAsyncInvoker(null, s, op); + return (Invoker)createAsyncInvoker(s, op); } - public InvokerAsyncRequest createAsyncInvoker(Endpoint endpoint, final RuntimeComponentService s, final Operation op) { + public InvokerAsyncRequest createAsyncInvoker(final RuntimeComponentService s, final Operation op) { try { // Creating an invoker for a Java or WSDL-typed implementation if(op instanceof JavaOperation) return new SampleJavaInvoker((JavaOperation)op, impl.clazz, instance); - return new SampleWSDLInvoker(endpoint, (WSDLOperation)op, impl.clazz, instance); + return new SampleWSDLInvoker((WSDLOperation)op, impl.clazz, instance); } catch(Exception e) { throw new RuntimeException(e); } diff --git a/sca-java-2.x/trunk/unreleased/samples/implementation-sample-async/src/main/java/sampleasync/impl/SampleWSDLInvoker.java b/sca-java-2.x/trunk/unreleased/samples/implementation-sample-async/src/main/java/sampleasync/impl/SampleWSDLInvoker.java index b0d9c07d86..26412ab281 100644 --- a/sca-java-2.x/trunk/unreleased/samples/implementation-sample-async/src/main/java/sampleasync/impl/SampleWSDLInvoker.java +++ b/sca-java-2.x/trunk/unreleased/samples/implementation-sample-async/src/main/java/sampleasync/impl/SampleWSDLInvoker.java @@ -36,13 +36,11 @@ import org.w3c.dom.Element; * @version $Rev$ $Date$ */ class SampleWSDLInvoker extends InterceptorAsyncImpl { - final Endpoint endpoint; final String name; final Object instance; final Method method; - SampleWSDLInvoker(Endpoint endpoint, final WSDLOperation op, final Class clazz, final Object instance) throws SecurityException, NoSuchMethodException { - this.endpoint = endpoint; + SampleWSDLInvoker(final WSDLOperation op, final Class clazz, final Object instance) throws SecurityException, NoSuchMethodException { this.name = op.getName(); this.instance = instance; this.method = clazz.getMethod("call", String.class, Element.class); -- cgit v1.2.3