Class PluginManager
- java.lang.Object
-
- org.gcube.vremanagement.executor.pluginmanager.PluginManager
-
public class PluginManager extends Object
This is a singleton class which discover on classpath the available plugins and map the plugin name to its implementation class. The plugin implementation class can be retrieved using its name.- Author:
- Luca Frosini (ISTI - CNR)
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedPluginManager()Used bygetInstance()function check the available plugin on classpath and add them onavailablePlugins
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<String,Class<? extends org.gcube.vremanagement.executor.plugin.Plugin>>getAvailablePlugins()static PluginManagergetInstance()Get the singleton instance ofPluginManager().org.gcube.vremanagement.executor.plugin.PlugingetPlugin(String pluginName)UUIDgetPluginUUID(String pluginName)
-
-
-
Constructor Detail
-
PluginManager
protected PluginManager()
Used bygetInstance()function check the available plugin on classpath and add them onavailablePlugins
-
-
Method Detail
-
getInstance
public static PluginManager getInstance()
Get the singleton instance ofPluginManager(). The first time this function is invoked the instance is null so it is created. Otherwise the already created instance is returned- Returns:
- singleton instance of
PluginManager()
-
getPlugin
public org.gcube.vremanagement.executor.plugin.Plugin getPlugin(String pluginName) throws org.gcube.vremanagement.executor.exception.PluginNotFoundException, org.gcube.vremanagement.executor.exception.ExecutorException
- Parameters:
pluginName- The name of the plugin- Returns:
- The plugin declaration if available, null otherwise
- Throws:
org.gcube.vremanagement.executor.exception.PluginNotFoundExceptionorg.gcube.vremanagement.executor.exception.ExecutorException
-
-