public class PluginsService extends AbstractComponent
Modifier and Type | Field | Description |
---|---|---|
static Setting<java.util.List<java.lang.String>> |
MANDATORY_SETTING |
deprecationLogger, logger, settings
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
|
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 provided
rootPath expanding meta-plugins if needed. |
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 extend
LifecycleComponent . |
java.util.List<Setting<?>> |
getPluginSettings() |
|
java.util.List<java.lang.String> |
getPluginSettingsFilter() |
|
PluginsAndModules |
info() |
Get information about plugins and modules
|
void |
onIndexModule(IndexModule indexModule) |
|
Settings |
updatedSettings() |
logDeprecatedSetting, logRemovedSetting, nodeName
public static final Setting<java.util.List<java.lang.String>> MANDATORY_SETTING
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)
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 loadedpublic java.util.List<Setting<?>> getPluginSettings()
public java.util.List<java.lang.String> getPluginSettingsFilter()
public Settings updatedSettings()
public java.util.Collection<Module> createGuiceModules()
public java.util.List<ExecutorBuilder<?>> getExecutorBuilders(Settings settings)
public java.util.Collection<java.lang.Class<? extends LifecycleComponent>> getGuiceServiceClasses()
LifecycleComponent
.public void onIndexModule(IndexModule indexModule)
public PluginsAndModules info()
public static java.util.List<java.nio.file.Path> findPluginDirs(java.nio.file.Path rootPath) throws java.io.IOException
rootPath
expanding meta-plugins if needed.rootPath
- the path where the plugins are installedrootPath
java.io.IOException
- if an I/O exception occurred reading the directoriespublic <T> java.util.List<T> filterPlugins(java.lang.Class<T> type)