Java service discovery is used to determine which classes in the plugin JAR present relevant functionality to the Delphix Masking Engine. When a plugin is loaded, the file com.delphix.masking.api.plugin.MaskingComponent under META-INF/services in the JAR is consulted for a list of classes that implement the MaskingComponent interface. As MaskingAlgorithm includes this interface, each algorithm in the plugin will be discovered this way. In the future, this mechanism may be expanded to support additional types of components beyond algorithms.
When the maskScript generate sub-command is used to create a new algorithm class, the service discovery metadata file is automatically updated.
If an algorithm class is missing from the services file, it will not be usable when the plugin is loaded. It is essentially invisible to the extensibility framework. If a class is mentioned in this file but not present in the JAR, the plugin will fail to load. There is a fallback during plugin loading that will scan the entire JAR for algorithms if the services file is not present. This fallback may be removed in the future and should not be relied on.