Here's the first version of a patch that adds one-way message support to Java.
The JSON syntax is that, instead of a response type and an error list, a one way message specifies '"one-way" true'. When this is specified, no response or error are transmitted, although a handshake response still may be, depending on the transport and its connection status. This is an incompatible extension to protocols: if a client or server adds a one-way message then existing implementations may fail to parse the remote protocol even if the one-way message is never called.
With the HTTP transport, a handshake response is still always sent, as before, so existing protocols work identically with existing implementations.
The previously non-standard socket transport is altered so that a handshake is now only sent with requests until a successful handshake response is received. Thereafter, as long as the connection remains open, requests and responses contain no handshakes. Thus, for one-way messages, no response data at all is transmitted once a connection is established.
The socket transport and one-way messages will be used to implement
AVRO-512, so the socket protocol must be now standardized and documented in the spec.
- add more unit tests
- document this in the spec, including the socket transport
- perhaps move the handshake test message from the Simple protocol to a new protocol, so this change does not break other languages.