Package org.jppf.discovery
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
Abstract superclass for custom driver discovery mechanisms.
- Since:
- 5.2.1
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract voiddiscover()Perform the driver discovery.protected voidnewConnection(E info) Notify that a new driver was discovered.voidshutdown()Shut this discovery down.
-
Constructor Details
-
DriverDiscovery
public DriverDiscovery()
-
-
Method Details
-
discover
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
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.
-