Hi everyone,
I'm curious about how to define an RPC message with a void return
type. For example, in this sample code for a simple key/value store:
{code}
{
"namespace": "com.example",
"protocol": "SimpleKV",
"types": [
],
"messages": {
"get": {
"request": [
{
"name": "key",
"type" : "bytes"
}
],
"response": "bytes"
},
"put": {
"request": [
{
"name": "key",
"type": "bytes"
},
{
"name": "value",
"type": "bytes"
}
],
"response": "null"
}
}
}
{code}
The 'put' message gets compiled into the following signature in Java:
{code}
Void put(ByteBuffer key, ByteBuffer value)
throws AvroRemoteException;
{code}
Unfortunately, Void isn't an instantiatable type in Java. Any thoughts?
Thanks,
George