Package org.elasticsearch.plugins
Class PluginsService
- java.lang.Object
-
- org.elasticsearch.plugins.PluginsService
-
public class PluginsService extends Object
-
-
Field Summary
Fields Modifier and Type Field Description static Setting<List<String>>MANDATORY_SETTING
-
Constructor Summary
Constructors Constructor Description PluginsService(Settings settings, Path configPath, Path modulesDirectory, Path pluginsDirectory, Collection<Class<? extends Plugin>> classpathPlugins)Constructs a new PluginService
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Collection<Module>createGuiceModules()<T> List<T>filterPlugins(Class<T> type)static List<Path>findPluginDirs(Path rootPath)Extracts all installed plugin directories from the providedrootPath.List<ExecutorBuilder<?>>getExecutorBuilders(Settings settings)Collection<Class<? extends LifecycleComponent>>getGuiceServiceClasses()Returns all classes injected into guice by plugins which extendLifecycleComponent.List<Setting<?>>getPluginSettings()List<String>getPluginSettingsFilter()PluginsAndModulesinfo()Get information about plugins and modulesvoidonIndexModule(IndexModule indexModule)SettingsupdatedSettings()
-
-
-
Constructor Detail
-
PluginsService
public PluginsService(Settings settings, Path configPath, Path modulesDirectory, Path pluginsDirectory, Collection<Class<? extends Plugin>> classpathPlugins)
Constructs a new PluginService- Parameters:
settings- The settings of the systemmodulesDirectory- The directory modules exist in, or null if modules should not be loaded from the filesystempluginsDirectory- The directory plugins exist in, or null if plugins should not be loaded from the filesystemclasspathPlugins- Plugins that exist in the classpath which should be loaded
-
-
Method Detail
-
updatedSettings
public Settings updatedSettings()
-
createGuiceModules
public Collection<Module> createGuiceModules()
-
getExecutorBuilders
public List<ExecutorBuilder<?>> getExecutorBuilders(Settings settings)
-
getGuiceServiceClasses
public Collection<Class<? extends LifecycleComponent>> getGuiceServiceClasses()
Returns all classes injected into guice by plugins which extendLifecycleComponent.
-
onIndexModule
public void onIndexModule(IndexModule indexModule)
-
info
public PluginsAndModules info()
Get information about plugins and modules
-
findPluginDirs
public static List<Path> findPluginDirs(Path rootPath) throws IOException
Extracts all installed plugin directories from the providedrootPath.- Parameters:
rootPath- the path where the plugins are installed- Returns:
- a list of all plugin paths installed in the
rootPath - Throws:
IOException- if an I/O exception occurred reading the directories
-
-