Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Plain View
Avro, mail # user - Protocol messages for which the response is null


Copy link to this message
-
Protocol messages for which the response is null
Jeff Hammerbacher 2010-05-18, 07:20
Hey,

I've got a protocol where many of the methods which do not return a
response; that is, they have "response": "null" in the protocol definition.
When I use the Java Specific compiler, I end up with a method whose return
type is java.lang.Void, rather than void. If, in the server implementation,
I use "void" rather than "Void" as the return type of the method, javac
complains that I have not implemented the interface correctly. Yet if I make
Void the return type of the implementing method, I can't figure out what to
return! new Void() doesn't work, and return; doesn't work either.

My knowledge of Java is quite limited, so any guidance on what to do here
would be helpful.

Thanks,
Jeff
+
Ryan Rawson 2010-05-18, 07:29