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 Details

    • PluginManager

      protected PluginManager()
      Used by getInstance() function check the available plugin on classpath and add them on availablePlugins
  • Method Details

    • getInstance

      public static PluginManager getInstance()
      Get the singleton instance of PluginManager(). 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.PluginNotFoundException
      org.gcube.vremanagement.executor.exception.ExecutorException
    • getPluginUUID

      public UUID getPluginUUID(String pluginName)
    • getAvailablePlugins

      public Map<String,Class<? extends org.gcube.vremanagement.executor.plugin.Plugin>> getAvailablePlugins()
      Returns:
      the availablePlugins