diff options
Diffstat (limited to '')
2 files changed, 27 insertions, 12 deletions
diff --git a/sca-java-2.x/trunk/modules/binding-jsonrpc/src/main/java/org/apache/tuscany/sca/binding/jsonrpc/JSONRPCBinding.java b/sca-java-2.x/trunk/modules/binding-jsonrpc/src/main/java/org/apache/tuscany/sca/binding/jsonrpc/JSONRPCBinding.java index 1e14502d93..158611b9cf 100644 --- a/sca-java-2.x/trunk/modules/binding-jsonrpc/src/main/java/org/apache/tuscany/sca/binding/jsonrpc/JSONRPCBinding.java +++ b/sca-java-2.x/trunk/modules/binding-jsonrpc/src/main/java/org/apache/tuscany/sca/binding/jsonrpc/JSONRPCBinding.java @@ -29,5 +29,11 @@ import org.apache.tuscany.sca.assembly.Binding; * @version $Rev$ $Date$ */ public interface JSONRPCBinding extends Binding { - QName TYPE = new QName(SCA11_TUSCANY_NS, "binding.jsonrpc"); + QName TYPE = new QName(SCA11_TUSCANY_NS, "binding.jsonrpc"); + String VERSION_10 = "1.0"; + String VERSION_20 = "2.0"; + + String getVersion(); + + void setVersion(String version); } diff --git a/sca-java-2.x/trunk/modules/binding-jsonrpc/src/main/java/org/apache/tuscany/sca/binding/jsonrpc/impl/JSONRPCBindingImpl.java b/sca-java-2.x/trunk/modules/binding-jsonrpc/src/main/java/org/apache/tuscany/sca/binding/jsonrpc/impl/JSONRPCBindingImpl.java index 4c1a261e81..88bb4b63c4 100644 --- a/sca-java-2.x/trunk/modules/binding-jsonrpc/src/main/java/org/apache/tuscany/sca/binding/jsonrpc/impl/JSONRPCBindingImpl.java +++ b/sca-java-2.x/trunk/modules/binding-jsonrpc/src/main/java/org/apache/tuscany/sca/binding/jsonrpc/impl/JSONRPCBindingImpl.java @@ -33,11 +33,12 @@ import org.apache.tuscany.sca.binding.jsonrpc.JSONRPCBinding; public class JSONRPCBindingImpl implements JSONRPCBinding { private String name; private String uri; + private String version = VERSION_10; public QName getType() { - return TYPE; - } - + return TYPE; + } + public String getName() { return name; } @@ -67,25 +68,33 @@ public class JSONRPCBindingImpl implements JSONRPCBinding { public Object clone() throws CloneNotSupportedException { return super.clone(); } - + public WireFormat getRequestWireFormat() { return null; } - - public void setRequestWireFormat(WireFormat wireFormat) { + + public void setRequestWireFormat(WireFormat wireFormat) { } - + public WireFormat getResponseWireFormat() { return null; } - + public void setResponseWireFormat(WireFormat wireFormat) { } - + public OperationSelector getOperationSelector() { return null; } - + public void setOperationSelector(OperationSelector operationSelector) { - } + } + + public String getVersion() { + return version; + } + + public void setVersion(String version) { + this.version = version; + } } |