Package org.apache.flink.core.plugin
Class DirectoryBasedPluginFinder
- java.lang.Object
-
- org.apache.flink.core.plugin.DirectoryBasedPluginFinder
-
- All Implemented Interfaces:
PluginFinder
public class DirectoryBasedPluginFinder extends Object implements PluginFinder
This class is used to create a collection ofPluginDescriptorbased 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 Summary
Constructors Constructor Description DirectoryBasedPluginFinder(Path pluginsRootDir)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Collection<PluginDescriptor>findPlugins()Find plugins and return a corresponding collection ofPluginDescriptorinstances.
-
-
-
Constructor Detail
-
DirectoryBasedPluginFinder
public DirectoryBasedPluginFinder(Path pluginsRootDir)
-
-
Method Detail
-
findPlugins
public Collection<PluginDescriptor> findPlugins() throws IOException
Description copied from interface:PluginFinderFind plugins and return a corresponding collection ofPluginDescriptorinstances.- Specified by:
findPluginsin interfacePluginFinder- Returns:
- a collection of
PluginDescriptorinstances for all found plugins. - Throws:
IOException- thrown if a problem occurs during plugin search.
-
-