Package org.elasticsearch.test.client
Class NoOpNodeClient
java.lang.Object
org.elasticsearch.client.internal.support.AbstractClient
org.elasticsearch.client.internal.node.NodeClient
org.elasticsearch.test.client.NoOpNodeClient
- All Implemented Interfaces:
Client
,ElasticsearchClient
- Direct Known Subclasses:
RestActionTestCase.VerifyingClient
Client that always response with
null
to every request. Override doExecute(ActionType, ActionRequest, ActionListener)
or
executeLocally(ActionType, ActionRequest, ActionListener)
for testing.
See also NoOpClient
if you do not specifically need a NodeClient
.-
Field Summary
Fields inherited from class org.elasticsearch.client.internal.support.AbstractClient
logger, settings
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<Request extends ActionRequest,
Response extends ActionResponse>
voiddoExecute
(ActionType<Response> action, Request request, ActionListener<Response> listener) <Request extends ActionRequest,
Response extends ActionResponse>
TaskexecuteLocally
(ActionType<Response> action, Request request, ActionListener<Response> listener) getRemoteClusterClient
(String clusterAlias, Executor responseExecutor, RemoteClusterService.DisconnectedStrategy disconnectedStrategy) void
initialize
(Map<ActionType<? extends ActionResponse>, TransportAction<? extends ActionRequest, ? extends ActionResponse>> actions, TaskManager taskManager, Supplier<String> localNodeId, Transport.Connection localConnection, RemoteClusterService remoteClusterService) Methods inherited from class org.elasticsearch.client.internal.node.NodeClient
getActionNames
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
-
Constructor Details
-
NoOpNodeClient
-
-
Method Details
-
doExecute
public <Request extends ActionRequest,Response extends ActionResponse> void doExecute(ActionType<Response> action, Request request, ActionListener<Response> listener) - Overrides:
doExecute
in classNodeClient
-
initialize
public void initialize(Map<ActionType<? extends ActionResponse>, TransportAction<? extends ActionRequest, ? extends ActionResponse>> actions, TaskManager taskManager, Supplier<String> localNodeId, Transport.Connection localConnection, RemoteClusterService remoteClusterService) - Overrides:
initialize
in classNodeClient
-
executeLocally
public <Request extends ActionRequest,Response extends ActionResponse> Task executeLocally(ActionType<Response> action, Request request, ActionListener<Response> listener) - Overrides:
executeLocally
in classNodeClient
-
getLocalNodeId
- Overrides:
getLocalNodeId
in classNodeClient
-
getRemoteClusterClient
public RemoteClusterClient getRemoteClusterClient(String clusterAlias, Executor responseExecutor, RemoteClusterService.DisconnectedStrategy disconnectedStrategy) - Specified by:
getRemoteClusterClient
in interfaceClient
- Overrides:
getRemoteClusterClient
in classNodeClient
-