hazelcast/hazelcast — pull request #3306 by lbakman (2014-08-18 17:36:00+00:00)
Title: Client multicast discovery

Hi

Second attempt at creating a pull request for multicast auto discovery

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