hazelcast/hazelcast — pull request #3302 by lbakman (2014-08-18 14:08:17+00:00)
Title: Multicast audio discovery support for HazelcastClient

Hi

I have attempted to implement this functionality based on 3.3-RC4-SNAPSHOT source.

Node:

Added a DiscoveryMessage
Added a MulticastListener for handling client DiscoveryMessages - responds to requests by replying with their ip address and port.
Modified MulticastService to work with Object instead of JoinMessage so MulticastListeners are not forced to handle JoinMessages.
Group name and password is verified to make sure client is part of the same cluster.
Configuration to enable/disable client multicast discovery.
Client

Added AddressProvider for multicast discovery. Sends out DiscoveryMessage and waits up to a timeout value for response.
Group name and password is verified to make sure response is received from correct cluster.
Currently only waits for a single response before returning.
Multicast configuration added to XSD, ClientNetworkConfig and XmlConfigBuilder.
Currently it has only been tested on my desktop machine, so I need to test it more than I already have. The DefaultAddressProvider is a bit in the way as it always returns 3 localhost addresses if no cluster-member is configured and they are always (so it seems) tried before the address returned by the new DiscoveryAddressProvider.

Regards Lau