Package org.elasticsearch.test.client
Class NoOpClient
java.lang.Object
org.elasticsearch.client.internal.support.AbstractClient
org.elasticsearch.test.client.NoOpClient
- All Implemented Interfaces:
Client
,ElasticsearchClient
Client that always responds with
null
to every request. Override doExecute(ActionType, ActionRequest, ActionListener)
for testing.
See also NoOpNodeClient
if you need to mock a NodeClient
.-
Field Summary
Fields inherited from class org.elasticsearch.client.internal.support.AbstractClient
logger, settings
Fields inherited from interface org.elasticsearch.client.internal.Client
CLIENT_TYPE_SETTING_S
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected <Request extends ActionRequest,
Response extends ActionResponse>
voiddoExecute
(ActionType<Response> action, Request request, ActionListener<Response> listener) Methods inherited from class org.elasticsearch.client.internal.support.AbstractClient
admin, bulk, bulk, clearScroll, clearScroll, delete, delete, execute, execute, explain, explain, fieldCaps, fieldCaps, filterWithHeader, get, get, index, index, multiGet, multiGet, multiSearch, multiSearch, multiTermVectors, multiTermVectors, prepareBulk, prepareBulk, prepareClearScroll, prepareDelete, prepareDelete, prepareExplain, prepareFieldCaps, prepareGet, prepareGet, prepareIndex, prepareIndex, prepareMultiGet, prepareMultiSearch, prepareMultiTermVectors, prepareSearch, prepareSearchScroll, prepareTermVectors, prepareTermVectors, prepareUpdate, prepareUpdate, search, search, searchScroll, searchScroll, settings, termVectors, termVectors, threadPool, update, update
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.elasticsearch.client.internal.Client
getRemoteClusterClient
-
Constructor Details
-
NoOpClient
-
-
Method Details
-
doExecute
protected <Request extends ActionRequest,Response extends ActionResponse> void doExecute(ActionType<Response> action, Request request, ActionListener<Response> listener) - Specified by:
doExecute
in classAbstractClient
-