summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/InterceptorAsyncImpl.java
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/InterceptorAsyncImpl.java34
1 files changed, 22 insertions, 12 deletions
diff --git a/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/InterceptorAsyncImpl.java b/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/InterceptorAsyncImpl.java
index 0c42a523a6..8495445951 100644
--- a/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/InterceptorAsyncImpl.java
+++ b/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/InterceptorAsyncImpl.java
@@ -22,7 +22,8 @@ package org.apache.tuscany.sca.core.invocation;
import org.apache.tuscany.sca.invocation.InterceptorAsync;
import org.apache.tuscany.sca.invocation.Invoker;
-import org.apache.tuscany.sca.invocation.InvokerAsync;
+import org.apache.tuscany.sca.invocation.InvokerAsyncRequest;
+import org.apache.tuscany.sca.invocation.InvokerAsyncResponse;
import org.apache.tuscany.sca.invocation.Message;
/**
@@ -33,22 +34,22 @@ import org.apache.tuscany.sca.invocation.Message;
*/
public abstract class InterceptorAsyncImpl implements InterceptorAsync {
- protected InvokerAsync next;
- protected InvokerAsync previous;
+ protected Invoker next;
+ protected InvokerAsyncResponse previous;
public Invoker getNext() {
return (Invoker)next;
}
public void setNext(Invoker next) {
- this.next = (InvokerAsync)next;
+ this.next = next;
}
- public InvokerAsync getPrevious() {
+ public InvokerAsyncResponse getPrevious() {
return previous;
}
- public void setPrevious(InvokerAsync previous) {
+ public void setPrevious(InvokerAsyncResponse previous) {
this.previous = previous;
}
@@ -61,14 +62,23 @@ public abstract class InterceptorAsyncImpl implements InterceptorAsync {
public void invokeAsyncRequest(Message msg) {
msg = processRequest(msg);
- ((InvokerAsync)getNext()).invokeAsyncRequest(msg);
+ ((InvokerAsyncRequest)getNext()).invokeAsyncRequest(msg);
}
- public Message invokeAsyncResponse(Message msg) {
+ public void invokeAsyncResponse(Message msg) {
msg = processResponse(msg);
- if (getPrevious() != null){
- return ((InvokerAsync)getPrevious()).invokeAsyncResponse(msg);
- }
- return msg;
+ ((InvokerAsyncResponse)getPrevious()).invokeAsyncResponse(msg);
+ }
+
+ /**
+ * A testing method while I use the local SCA binding wire to look
+ * at how the async response path works. This allows me to detect the
+ * point where the reference wire turns into the service with in the
+ * optimized case
+ *
+ * @return
+ */
+ public boolean isLocalSCABIndingInvoker() {
+ return false;
}
}