diff options
author | slaws <slaws@13f79535-47bb-0310-9956-ffa450edef68> | 2010-12-09 11:56:11 +0000 |
---|---|---|
committer | slaws <slaws@13f79535-47bb-0310-9956-ffa450edef68> | 2010-12-09 11:56:11 +0000 |
commit | 21c4fe09a85c35932b3240f3a4141849e80496da (patch) | |
tree | 1a3a6d9cb787b42995551fcde9715d7cb1a3cf47 /sca-java-2.x/trunk/unreleased/samples/implementation-sample-async/src/main/java | |
parent | 8d8b0bab043fad2f4773c40cff8c2a1e6d935df6 (diff) |
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
Diffstat (limited to 'sca-java-2.x/trunk/unreleased/samples/implementation-sample-async/src/main/java')
2 files changed, 4 insertions, 9 deletions
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); |