Package org.jppf.startup
Interface JPPFClientStartupSPI
- All Superinterfaces:
JPPFStartup,Runnable
This interface class represents objects that are run at client startup time.
More precisely, they are run just before any connection with a driver is established.
Classes implementing this interface must have a public no-arg constructor and implement the run() method.
Client startup classes allow a developer to perform initializations at runtime, such as load specific APIs, create connection pools, subscribe to the monitoring MBeans notifications, etc. The range of applications is quite broad.
They are looked up by using the Service Provider Interface (SPI) lookup mechanism. For the SPI to find them, proceed as follows:
- in the classpath root create, if it does not exist, a folder named META-INF/services
- in this folder create a file named "org.jppf.startup.JPPFClientStartupSPI"
- the content of this file is one or more line(s) with the fully qualified class name of an implementation of this interface
- to specify multiple implementations, just put one per line in the file
- there can also be multiple META-INF/services/org.jppf.startup.JPPFClientStartupSPI resources in the classpath (for instance in multiple jar files); all of them will be looked up and processed
- Author:
- Laurent Cohen
-
Method Summary