Class DriverDiscoveryHandler<E extends DriverConnectionInfo>

java.lang.Object
org.jppf.discovery.DriverDiscoveryHandler<E>
Type Parameters:
E - the type of notifications managed by this handler.

public class DriverDiscoveryHandler<E extends DriverConnectionInfo> extends Object
Author:
Laurent Cohen
  • Constructor Details

    • DriverDiscoveryHandler

      public DriverDiscoveryHandler(Class<DriverDiscovery<E>> clazz)
      Load the discovery mechanisms from the SPI.
      Parameters:
      clazz - the class of driver discoveries to llokup via SPI.
  • Method Details

    • getDiscoveries

      public List<DriverDiscovery<E>> getDiscoveries()
      Get the discovered discovery mechanisms.
      Returns:
      a list of DriverDiscovery instances, eventually empty.
    • toJPPFConnectionInformation

      public static JPPFConnectionInformation toJPPFConnectionInformation(DriverConnectionInfo driverInfo)
      Parameters:
      driverInfo - to data to convert.
      Returns:
      the converted data.
    • addDiscovery

      public void addDiscovery(DriverDiscovery<E> discovery)
      Add a new disocvery to this handler.
      Parameters:
      discovery - the discovery to add.
    • removeDiscovery

      public void removeDiscovery(DriverDiscovery<E> discovery)
      Remove an existing disocvery from this handler.
      Parameters:
      discovery - the discovery to remove.
    • register

      public DriverDiscoveryHandler<E> register(DriverDiscoveryListener<E> listener)
      Register the specified discovery listener with all disoveries found with SPI.
      Parameters:
      listener - the listener to register.
      Returns:
      this handler.
    • unregister

      public DriverDiscoveryHandler<E> unregister(DriverDiscoveryListener<E> listener)
      Unregister the specified disocvery listener from all discoveries found with SPI.
      Parameters:
      listener - the listener to unregister.
      Returns:
      this handler.
    • start

      public DriverDiscoveryHandler<E> start()
      Start all discoveries found via SPI.
      Returns:
      this handler.
    • stop

      public DriverDiscoveryHandler<E> stop()
      Closes this discovery and releases any resource it uses.
      Returns:
      this handler.