Skip to content
This repository has been 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
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

jamhall
Copy link

@jamhall jamhall commented Jul 19, 2016

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
Copy link

coveralls commented Jul 19, 2016

Coverage Status

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

@coveralls
Copy link

coveralls commented Jul 19, 2016

Coverage Status

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

@coveralls
Copy link

coveralls commented Jul 19, 2016

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