Skip to content

Use SPI in High Level Rest Client to load XContent parsers#25097

Closed
tlrx wants to merge 1 commit intoelastic:masterfrom
tlrx:use-spi-to-provide-named-xcontent-parsers
Closed

Use SPI in High Level Rest Client to load XContent parsers#25097
tlrx wants to merge 1 commit intoelastic:masterfrom
tlrx:use-spi-to-provide-named-xcontent-parsers

Conversation

@tlrx
Copy link
Copy Markdown
Member

@tlrx tlrx commented Jun 7, 2017

This commit adds a new NamedXContentProvider interface to core that can be implemented by plugins in order to provide a list of named XContent parsers implementations to external applications (like the High Level REST Client) using the Java Service Provider Interface.

This pull request uses Java's SPI as a alternate mechanism to PluginService in order to provide named XContent parsers to the High Level REST Client as suggested by @rjernst in #25024 (comment).

For now services files are static but they could be generated by Gradle.

The High Level REST Client can use Java's SPI to load named XContent
parsers implementations provided by plugins or modules.
Copy link
Copy Markdown
Contributor

@javanna javanna left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@tlrx
Copy link
Copy Markdown
Member Author

tlrx commented Jun 9, 2017

Superseded by #25098

@tlrx tlrx closed this Jun 9, 2017
tlrx added a commit to tlrx/elasticsearch that referenced this pull request Jun 15, 2017
@tlrx tlrx deleted the use-spi-to-provide-named-xcontent-parsers branch June 15, 2017 11:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants