Package org.jgroups.tests
Class McastDiscovery
- java.lang.Object
-
- org.jgroups.tests.McastDiscovery
-
public class McastDiscovery extends java.lang.ObjectDiscovers all neighbors in an IP multicast environment by using expanding ring multicasts (increasing TTL). The sender multicasts a discovery packet on all available network interfaces, while also listening on all interfaces. The discovery packet contains the sender's address, which is the address and port of the interface on which the packet was sent. A receiver replies with an ACK back to the sender's address and port. After n responses or m milliseconds, the sender terminates and computes the network interfaces which should be used. The network interface is the intersection of the interface variable of all ACKs received.- Version:
- $Revision: 1.1 $
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) classMcastDiscovery.McastSender(package private) classMcastDiscovery.MessageHandler
-
Field Summary
Fields Modifier and Type Field Description (package private) java.util.Listhandlers(package private) longinterval(package private) java.util.HashMapmap(package private) java.net.InetAddressmcast_addr(package private) intmcast_port(package private) McastDiscovery.McastSendermcast_sender(package private) booleanrunning(package private) intttl
-
Constructor Summary
Constructors Constructor Description McastDiscovery(java.net.InetAddress mcast_addr, int mcast_port, long interval, int ttl)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) static voidhelp()static voidmain(java.lang.String[] args)(package private) voidprintValidInterfaces()voidstart()
-
-
-
Field Detail
-
ttl
int ttl
-
handlers
java.util.List handlers
-
mcast_addr
java.net.InetAddress mcast_addr
-
mcast_port
int mcast_port
-
interval
long interval
-
mcast_sender
McastDiscovery.McastSender mcast_sender
-
running
volatile boolean running
-
map
java.util.HashMap map
-
-