Class DriverDiscovery<E extends DriverConnectionInfo>

java.lang.Object
org.jppf.discovery.DriverDiscovery<E>
Type Parameters:
E - the type of notifications sent by this discovery.
Direct Known Subclasses:
ClientDriverDiscovery, PeerDriverDiscovery

public abstract class DriverDiscovery<E extends DriverConnectionInfo> extends Object
Abstract superclass for custom driver discovery mechanisms.
Since:
5.2.1
  • Constructor Details

    • DriverDiscovery

      public DriverDiscovery()
  • Method Details

    • discover

      public abstract void discover() throws InterruptedException
      Perform the driver discovery. This method runs in its own separate thread.

      To notify the client that a new driver is discovered, the newConnection(DriverConnectionInfo) method must be called.

      Throws:
      InterruptedException - if the thread running this method is still alive when the component that started it (a JPPF client or driver) is closed or shut down.
    • newConnection

      protected void newConnection(E info)
      Notify that a new driver was discovered.
      Parameters:
      info - encapsulates the driver connection information and configuration,
    • shutdown

      public void shutdown()
      Shut this discovery down. This method is intended to be overriden in subclasses to allow user-defined cleanup operations.

      Caution: this method is called in a different thread from the one that runs the discover() method.