Add extra ctor to FilterClient to support Guice proxies
just don't ask it's bad but some plugins are so involved they need this. Closes #the_issue_that_never_existed
This commit is contained in:
parent
0660de7472
commit
9196ff255e
|
@ -24,6 +24,8 @@ import org.elasticsearch.action.ActionRequest;
|
||||||
import org.elasticsearch.action.ActionRequestBuilder;
|
import org.elasticsearch.action.ActionRequestBuilder;
|
||||||
import org.elasticsearch.action.ActionResponse;
|
import org.elasticsearch.action.ActionResponse;
|
||||||
import org.elasticsearch.client.support.AbstractClient;
|
import org.elasticsearch.client.support.AbstractClient;
|
||||||
|
import org.elasticsearch.common.settings.Settings;
|
||||||
|
import org.elasticsearch.threadpool.ThreadPool;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -42,7 +44,15 @@ public abstract class FilterClient extends AbstractClient {
|
||||||
* @see #in()
|
* @see #in()
|
||||||
*/
|
*/
|
||||||
public FilterClient(Client in) {
|
public FilterClient(Client in) {
|
||||||
super(in.settings(), in.threadPool());
|
this(in.settings(), in.threadPool(), in);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A Constructor that allows to pass settings and threadpool separately. This is useful if the
|
||||||
|
* client is a proxy and not yet fully constructed ie. both dependencies are not available yet.
|
||||||
|
*/
|
||||||
|
protected FilterClient(Settings settings, ThreadPool threadPool, Client in) {
|
||||||
|
super(settings, threadPool);
|
||||||
this.in = in;
|
this.in = in;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue