Package org.elasticsearch.plugins
Class PluginInfo
java.lang.Object
org.elasticsearch.plugins.PluginInfo
- All Implemented Interfaces:
Writeable,org.elasticsearch.common.xcontent.ToXContent,org.elasticsearch.common.xcontent.ToXContentObject
public class PluginInfo extends java.lang.Object implements Writeable, org.elasticsearch.common.xcontent.ToXContentObject
An in-memory representation of the plugin descriptor.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.common.xcontent.ToXContent
org.elasticsearch.common.xcontent.ToXContent.DelegatingMapParams, org.elasticsearch.common.xcontent.ToXContent.MapParams, org.elasticsearch.common.xcontent.ToXContent.ParamsNested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V> -
Field Summary
Fields Modifier and Type Field Description static java.lang.StringES_PLUGIN_POLICYstatic java.lang.StringES_PLUGIN_PROPERTIES -
Constructor Summary
Constructors Constructor Description PluginInfo(java.lang.String name, java.lang.String description, java.lang.String version, Version elasticsearchVersion, java.lang.String javaVersion, java.lang.String classname, java.util.List<java.lang.String> extendedPlugins, boolean hasNativeController)Construct plugin info.PluginInfo(StreamInput in)Construct plugin info from a stream. -
Method Summary
Modifier and Type Method Description booleanequals(java.lang.Object o)java.lang.StringgetClassname()The entry point to the plugin.java.lang.StringgetDescription()The description of the plugin.VersiongetElasticsearchVersion()The version of Elasticsearch the plugin was built for.java.util.List<java.lang.String>getExtendedPlugins()Other plugins this plugin extends through SPI.java.lang.StringgetJavaVersion()The version of Java the plugin was built with.java.lang.StringgetName()The name of the plugin.java.lang.StringgetVersion()The version of the plugininthashCode()booleanhasNativeController()Whether or not the plugin has a native controller.static PluginInforeadFromProperties(java.nio.file.Path path)Reads the plugin descriptor file.java.lang.StringtoString()java.lang.StringtoString(java.lang.String prefix)org.elasticsearch.common.xcontent.XContentBuildertoXContent(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params)voidwriteTo(StreamOutput out)Write this into the StreamOutput.
-
Field Details
-
ES_PLUGIN_PROPERTIES
public static final java.lang.String ES_PLUGIN_PROPERTIES- See Also:
- Constant Field Values
-
ES_PLUGIN_POLICY
public static final java.lang.String ES_PLUGIN_POLICY- See Also:
- Constant Field Values
-
-
Constructor Details
-
PluginInfo
public PluginInfo(java.lang.String name, java.lang.String description, java.lang.String version, Version elasticsearchVersion, java.lang.String javaVersion, java.lang.String classname, java.util.List<java.lang.String> extendedPlugins, boolean hasNativeController)Construct plugin info.- Parameters:
name- the name of the plugindescription- a description of the pluginversion- an opaque version identifier for the pluginelasticsearchVersion- the version of Elasticsearch the plugin was built forjavaVersion- the version of Java the plugin was built withclassname- the entry point to the pluginextendedPlugins- other plugins this plugin extends through SPIhasNativeController- whether or not the plugin has a native controller
-
PluginInfo
Construct plugin info from a stream.- Parameters:
in- the stream- Throws:
java.io.IOException- if an I/O exception occurred reading the plugin info from the stream
-
-
Method Details
-
writeTo
Description copied from interface:WriteableWrite this into the StreamOutput. -
readFromProperties
Reads the plugin descriptor file.- Parameters:
path- the path to the root directory for the plugin- Returns:
- the plugin info
- Throws:
java.io.IOException- if an I/O exception occurred reading the plugin descriptor
-
getName
public java.lang.String getName()The name of the plugin.- Returns:
- the plugin name
-
getDescription
public java.lang.String getDescription()The description of the plugin.- Returns:
- the plugin description
-
getClassname
public java.lang.String getClassname()The entry point to the plugin.- Returns:
- the entry point to the plugin
-
getExtendedPlugins
public java.util.List<java.lang.String> getExtendedPlugins()Other plugins this plugin extends through SPI.- Returns:
- the names of the plugins extended
-
getVersion
public java.lang.String getVersion()The version of the plugin- Returns:
- the version
-
getElasticsearchVersion
The version of Elasticsearch the plugin was built for.- Returns:
- an Elasticsearch version
-
getJavaVersion
public java.lang.String getJavaVersion()The version of Java the plugin was built with.- Returns:
- a java version string
-
hasNativeController
public boolean hasNativeController()Whether or not the plugin has a native controller.- Returns:
trueif the plugin has a native controller
-
toXContent
public org.elasticsearch.common.xcontent.XContentBuilder toXContent(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params) throws java.io.IOException- Specified by:
toXContentin interfaceorg.elasticsearch.common.xcontent.ToXContent- Throws:
java.io.IOException
-
equals
public boolean equals(java.lang.Object o)- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()- Overrides:
toStringin classjava.lang.Object
-
toString
public java.lang.String toString(java.lang.String prefix)
-