org.jppf.comm.discovery
Class JPPFMulticastReceiver

java.lang.Object
  extended by org.jppf.utils.ThreadSynchronization
      extended by 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

Nested Class Summary
 class JPPFMulticastReceiver.Receiver
          Instances of this class attempt to receive broadcast connection information from a multicast socket bound to a specified address.
 
Field Summary
 
Fields inherited from class org.jppf.utils.ThreadSynchronization
stopped
 
Constructor Summary
JPPFMulticastReceiver()
          Default constructor.
JPPFMulticastReceiver(IPFilter ipFilter)
          Default constructor.
JPPFMulticastReceiver(String group, int port, int timeout)
          Initialize this discovery thread with the specified UDP group, UDP port and timeout.
 
Method Summary
 JPPFConnectionInformation receive()
          Retrieve the driver connection information broadcast by the driver.
 
Methods inherited from class org.jppf.utils.ThreadSynchronization
goToSleep, goToSleep, goToSleep, isStopped, setStopped, wakeUp
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

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 Detail

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.


Copyright © 2005-2010 JPPF Team.