summaryrefslogtreecommitdiffstats
path: root/java/sca/modules/binding-jsonrpc-runtime
diff options
context:
space:
mode:
authorrfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68>2009-10-09 22:55:37 +0000
committerrfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68>2009-10-09 22:55:37 +0000
commit8c67595b5299dd0b4691ef0c93c01df3c818c74b (patch)
tree1b80129116dba29c05869595ca6683454b489abd /java/sca/modules/binding-jsonrpc-runtime
parent8020246860aa8ff999acf40f199a8522d4496d93 (diff)
Improve the bindings to avoid data copy
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@823730 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/sca/modules/binding-jsonrpc-runtime')
-rw-r--r--java/sca/modules/binding-jsonrpc-runtime/src/main/java/org/apache/tuscany/sca/binding/jsonrpc/provider/JSONRPCBindingInvoker.java7
-rw-r--r--java/sca/modules/binding-jsonrpc-runtime/src/main/java/org/apache/tuscany/sca/binding/jsonrpc/provider/JSONRPCClientInvoker.java8
2 files changed, 12 insertions, 3 deletions
diff --git a/java/sca/modules/binding-jsonrpc-runtime/src/main/java/org/apache/tuscany/sca/binding/jsonrpc/provider/JSONRPCBindingInvoker.java b/java/sca/modules/binding-jsonrpc-runtime/src/main/java/org/apache/tuscany/sca/binding/jsonrpc/provider/JSONRPCBindingInvoker.java
index 9767f6f46b..12f69dffc7 100644
--- a/java/sca/modules/binding-jsonrpc-runtime/src/main/java/org/apache/tuscany/sca/binding/jsonrpc/provider/JSONRPCBindingInvoker.java
+++ b/java/sca/modules/binding-jsonrpc-runtime/src/main/java/org/apache/tuscany/sca/binding/jsonrpc/provider/JSONRPCBindingInvoker.java
@@ -25,6 +25,7 @@ import org.apache.commons.httpclient.methods.StringRequestEntity;
import org.apache.tuscany.sca.assembly.EndpointReference;
import org.apache.tuscany.sca.binding.jsonrpc.JSONRPCBinding;
import org.apache.tuscany.sca.interfacedef.Operation;
+import org.apache.tuscany.sca.invocation.DataExchangeSemantics;
import org.apache.tuscany.sca.invocation.Invoker;
import org.apache.tuscany.sca.invocation.Message;
import org.json.JSONArray;
@@ -35,7 +36,7 @@ import org.json.JSONObject;
*
* @version $Rev$ $Date$
*/
-public class JSONRPCBindingInvoker implements Invoker {
+public class JSONRPCBindingInvoker implements Invoker, DataExchangeSemantics {
private EndpointReference endpointReference;
private Operation operation;
private String uri;
@@ -139,4 +140,8 @@ public class JSONRPCBindingInvoker implements Invoker {
return jsonRequest;
}
+
+ public boolean allowsPassByReference() {
+ return true;
+ }
}
diff --git a/java/sca/modules/binding-jsonrpc-runtime/src/main/java/org/apache/tuscany/sca/binding/jsonrpc/provider/JSONRPCClientInvoker.java b/java/sca/modules/binding-jsonrpc-runtime/src/main/java/org/apache/tuscany/sca/binding/jsonrpc/provider/JSONRPCClientInvoker.java
index 962c269673..3290993d80 100644
--- a/java/sca/modules/binding-jsonrpc-runtime/src/main/java/org/apache/tuscany/sca/binding/jsonrpc/provider/JSONRPCClientInvoker.java
+++ b/java/sca/modules/binding-jsonrpc-runtime/src/main/java/org/apache/tuscany/sca/binding/jsonrpc/provider/JSONRPCClientInvoker.java
@@ -26,6 +26,7 @@ import org.apache.tuscany.sca.assembly.EndpointReference;
import org.apache.tuscany.sca.binding.jsonrpc.JSONRPCBinding;
import org.apache.tuscany.sca.interfacedef.Operation;
import org.apache.tuscany.sca.interfacedef.java.JavaOperation;
+import org.apache.tuscany.sca.invocation.DataExchangeSemantics;
import org.apache.tuscany.sca.invocation.Invoker;
import org.apache.tuscany.sca.invocation.Message;
import org.jabsorb.client.Client;
@@ -37,7 +38,7 @@ import org.jabsorb.client.TransportRegistry;
*
* @version $Rev$ $Date$
*/
-public class JSONRPCClientInvoker implements Invoker {
+public class JSONRPCClientInvoker implements Invoker, DataExchangeSemantics {
private EndpointReference endpointReference;
private Operation operation;
private Method method;
@@ -69,5 +70,8 @@ public class JSONRPCClientInvoker implements Invoker {
}
return msg;
}
-
+
+ public boolean allowsPassByReference() {
+ return true;
+ }
}