Class Probe

java.lang.Object
org.jgroups.tests.Probe

public class Probe extends Object
Discovers all UDP-based members running on a certain mcast address
  • Field Details

  • Constructor Details

    • Probe

      public Probe()
  • Method Details

    • verbose

      public boolean verbose()
    • verbose

      public Probe verbose(boolean b)
    • start

      public void start(List<InetAddress> addrs, InetAddress bind_addr, int port, int ttl, long timeout, String request, String match, boolean weed_out_duplicates, String passcode, boolean udp, boolean tcp) throws Exception
      Throws:
      Exception
    • fetchAddressesAndInvoke

      protected void fetchAddressesAndInvoke(SocketAddress dest, InetAddress bind_addr, String request, String passcode, long timeout, int ttl, boolean udp, boolean tcp) throws IOException
      Throws:
      IOException
    • parseAddresses

      protected static Collection<SocketAddress> parseAddresses(String input, int port) throws Exception
      Returns a list of addr:port responses. Counting the occurrences of a given address, e.g. 3 assumes we have 3 processes on the same host, yielding requests to host:port, host:port+1 and host_port+3. This is a quick-n-dirty scheme and it will fail when processes don't occupy adjacent ports.
      Throws:
      Exception
    • checkDuplicateResponse

      private boolean checkDuplicateResponse(String response)
    • parseAddress

      private static String parseAddress(String response)
    • matches

      private static boolean matches(String response, String match)
    • main

      public static void main(String[] args) throws Exception
      Throws:
      Exception
    • help

      protected static void help()