Skip to content
This repository was archived by the owner on Nov 18, 2022. It is now read-only.

Added a provider to allow the ES client to be accessed via the resource request scope - #17

Open
jamhall wants to merge 3 commits into
dropwizard:masterfrom
jamhall:master
Open

Added a provider to allow the ES client to be accessed via the resource request scope#17
jamhall wants to merge 3 commits into
dropwizard:masterfrom
jamhall:master

Conversation

@jamhall

@jamhall jamhall commented Jul 19, 2016

Copy link
Copy Markdown

Hello,

You can now access the client via the the request scope:

By registering the provider in the application run method:

environment.jersey().register(EsProvider.binder(managedClient));

You will be able to access the client via an injected parameter in the resource method:

public List<Message> getMessages(@Context Client es) {
    SearchResponse response = es.prepareSearch etc.
}

Please let me know If I haven't correctly implemented the provider...

Thank you for the project!

@coveralls

coveralls commented Jul 19, 2016

Copy link
Copy Markdown

Coverage Status

Coverage decreased (-7.2%) to 72.18% when pulling 0a5f469 on jamhall:master into 5a8e637 on dropwizard:master.

@coveralls

coveralls commented Jul 19, 2016

Copy link
Copy Markdown

Coverage Status

Coverage decreased (-7.2%) to 72.18% when pulling 0a5f469 on jamhall:master into 5a8e637 on dropwizard:master.

@coveralls

coveralls commented Jul 19, 2016

Copy link
Copy Markdown

Coverage Status

Coverage decreased (-6.6%) to 72.727% when pulling 6112eb5 on jamhall:master into 5a8e637 on dropwizard:master.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants