Package org.elasticsearch.plugins
Class PluginsService
- java.lang.Object
-
- org.elasticsearch.common.component.AbstractComponent
-
- org.elasticsearch.plugins.PluginsService
-
public class PluginsService extends AbstractComponent
-
-
Field Summary
Fields Modifier and Type Field Description static Setting<java.util.List<java.lang.String>>
MANDATORY_SETTING
-
Fields inherited from class org.elasticsearch.common.component.AbstractComponent
deprecationLogger, logger, settings
-
-
Constructor Summary
Constructors Constructor Description PluginsService(Settings settings, java.nio.file.Path configPath, java.nio.file.Path modulesDirectory, java.nio.file.Path pluginsDirectory, java.util.Collection<java.lang.Class<? extends Plugin>> classpathPlugins)
Constructs a new PluginService
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Collection<Module>
createGuiceModules()
<T> java.util.List<T>
filterPlugins(java.lang.Class<T> type)
static java.util.List<java.nio.file.Path>
findPluginDirs(java.nio.file.Path rootPath)
Extracts all installed plugin directories from the providedrootPath
.java.util.List<ExecutorBuilder<?>>
getExecutorBuilders(Settings settings)
java.util.Collection<java.lang.Class<? extends LifecycleComponent>>
getGuiceServiceClasses()
Returns all classes injected into guice by plugins which extendLifecycleComponent
.java.util.List<Setting<?>>
getPluginSettings()
java.util.List<java.lang.String>
getPluginSettingsFilter()
PluginsAndModules
info()
Get information about plugins and modulesvoid
onIndexModule(IndexModule indexModule)
Settings
updatedSettings()
-
Methods inherited from class org.elasticsearch.common.component.AbstractComponent
logDeprecatedSetting, logRemovedSetting, nodeName
-
-
-
-
Field Detail
-
MANDATORY_SETTING
public static final Setting<java.util.List<java.lang.String>> MANDATORY_SETTING
-
-
Constructor Detail
-
PluginsService
public PluginsService(Settings settings, java.nio.file.Path configPath, java.nio.file.Path modulesDirectory, java.nio.file.Path pluginsDirectory, java.util.Collection<java.lang.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
-
getPluginSettings
public java.util.List<Setting<?>> getPluginSettings()
-
getPluginSettingsFilter
public java.util.List<java.lang.String> getPluginSettingsFilter()
-
updatedSettings
public Settings updatedSettings()
-
createGuiceModules
public java.util.Collection<Module> createGuiceModules()
-
getExecutorBuilders
public java.util.List<ExecutorBuilder<?>> getExecutorBuilders(Settings settings)
-
getGuiceServiceClasses
public java.util.Collection<java.lang.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 java.util.List<java.nio.file.Path> findPluginDirs(java.nio.file.Path rootPath) throws java.io.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:
java.io.IOException
- if an I/O exception occurred reading the directories
-
filterPlugins
public <T> java.util.List<T> filterPlugins(java.lang.Class<T> type)
-
-