public class DirectoryBasedPluginFinder extends Object implements PluginFinder
PluginDescriptor
based on directory
structure for a given plugin root folder.
The expected structure is as follows: the given plugins root folder, containing the plugins folder. One plugin folder contains all resources (jar files) belonging to a plugin. The name of the plugin folder becomes the plugin id.
plugins-root-folder/ |------------plugin-a/ (folder of plugin a) | |-plugin-a-1.jar (the jars containing the classes of plugin a) | |-plugin-a-2.jar | |-... | |------------plugin-b/ | |-plugin-b-1.jar ... |-...
Constructor and Description |
---|
DirectoryBasedPluginFinder(Path pluginsRootDir) |
Modifier and Type | Method and Description |
---|---|
Collection<PluginDescriptor> |
findPlugins()
Find plugins and return a corresponding collection of
PluginDescriptor instances. |
public DirectoryBasedPluginFinder(Path pluginsRootDir)
public Collection<PluginDescriptor> findPlugins() throws IOException
PluginFinder
PluginDescriptor
instances.findPlugins
in interface PluginFinder
PluginDescriptor
instances for all found plugins.IOException
- thrown if a problem occurs during plugin search.Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.