Class PluginManager
java.lang.Object
org.gcube.vremanagement.executor.pluginmanager.PluginManager
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
ConstructorsModifierConstructorDescriptionprotectedUsed bygetInstance()function check the available plugin on classpath and add them onavailablePlugins -
Method Summary
Modifier and TypeMethodDescriptionstatic PluginManagerGet the singleton instance ofPluginManager().org.gcube.vremanagement.executor.plugin.PlugingetPluginUUID(String pluginName)
-
Constructor Details
-
PluginManager
protected PluginManager()Used bygetInstance()function check the available plugin on classpath and add them onavailablePlugins
-
-
Method Details
-
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
-
getPluginUUID
-
getAvailablePlugins
public Map<String,Class<? extends org.gcube.vremanagement.executor.plugin.Plugin>> getAvailablePlugins()- Returns:
- the availablePlugins
-