Class JPPFMulticastReceiver

java.lang.Object
org.jppf.utils.concurrent.ThreadSynchronization
org.jppf.comm.discovery.JPPFMulticastReceiver

public class JPPFMulticastReceiver extends ThreadSynchronization
An instance of this class listens to messages broadcast by the driver to get the driver connection host and ports.
Author:
Laurent Cohen
  • Constructor Details

    • JPPFMulticastReceiver

      public JPPFMulticastReceiver()
      Default constructor.
    • JPPFMulticastReceiver

      public JPPFMulticastReceiver(IPFilter ipFilter)
      Default constructor.
      Parameters:
      ipFilter - handles include and exclude IP filters.
    • JPPFMulticastReceiver

      public JPPFMulticastReceiver(String group, int port, int timeout)
      Initialize this discovery thread with the specified UDP group, UDP port and timeout.
      Parameters:
      group - the multicast group to join.
      port - the multicast port to listen to.
      timeout - the timeout for UDP socket read operations.
  • Method Details

    • receive

      public JPPFConnectionInformation receive()
      Retrieve the driver connection information broadcast by the driver.
      Returns:
      a DriverConnectionInformation instance, or null if no broadcast information could be retrieved.
    • setStopped

      public void setStopped(boolean stopped)
      Description copied from class: ThreadSynchronization
      Specify whether the thread's run() should terminate.
      Overrides:
      setStopped in class ThreadSynchronization
      Parameters:
      stopped - true if the thread is to be stopped, false otherwise.