Package org.jppf.discovery
Class DriverDiscoveryHandler<E extends DriverConnectionInfo>
java.lang.Object
org.jppf.discovery.DriverDiscoveryHandler<E>
- Type Parameters:
E- the type of notifications managed by this handler.
- Author:
- Laurent Cohen
-
Constructor Summary
ConstructorsConstructorDescriptionDriverDiscoveryHandler(Class<DriverDiscovery<E>> clazz) Load the discovery mechanisms from the SPI. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddDiscovery(DriverDiscovery<E> discovery) Add a new disocvery to this handler.Get the discovered discovery mechanisms.register(DriverDiscoveryListener<E> listener) Register the specified discovery listener with all disoveries found with SPI.voidremoveDiscovery(DriverDiscovery<E> discovery) Remove an existing disocvery from this handler.start()Start all discoveries found via SPI.stop()Closes this discovery and releases any resource it uses.static JPPFConnectionInformationtoJPPFConnectionInformation(DriverConnectionInfo driverInfo) Convert aDriverConnectionInfointo aJPPFConnectionInformation.unregister(DriverDiscoveryListener<E> listener) Unregister the specified disocvery listener from all discoveries found with SPI.
-
Constructor Details
-
DriverDiscoveryHandler
Load the discovery mechanisms from the SPI.- Parameters:
clazz- the class of driver discoveries to llokup via SPI.
-
-
Method Details
-
getDiscoveries
Get the discovered discovery mechanisms.- Returns:
- a list of
DriverDiscoveryinstances, eventually empty.
-
toJPPFConnectionInformation
public static JPPFConnectionInformation toJPPFConnectionInformation(DriverConnectionInfo driverInfo) Convert aDriverConnectionInfointo aJPPFConnectionInformation.- Parameters:
driverInfo- to data to convert.- Returns:
- the converted data.
-
addDiscovery
Add a new disocvery to this handler.- Parameters:
discovery- the discovery to add.
-
removeDiscovery
Remove an existing disocvery from this handler.- Parameters:
discovery- the discovery to remove.
-
register
Register the specified discovery listener with all disoveries found with SPI.- Parameters:
listener- the listener to register.- Returns:
- this handler.
-
unregister
Unregister the specified disocvery listener from all discoveries found with SPI.- Parameters:
listener- the listener to unregister.- Returns:
- this handler.
-
start
Start all discoveries found via SPI.- Returns:
- this handler.
-
stop
Closes this discovery and releases any resource it uses.- Returns:
- this handler.
-