Class RestClientOptions
java.lang.Object
co.elastic.clients.transport.rest_client.RestClientOptions
- All Implemented Interfaces:
TransportOptions
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionRestClientOptions
(org.elasticsearch.client.RequestOptions options, boolean keepResponseBodyOnException) -
Method Summary
Modifier and TypeMethodDescriptionheaders()
boolean
Iftrue
, the response body inTransportException.response().body()
is guaranteed to be replayable (i.e.Called if there are warnings to determine if those warnings should fail the request.org.elasticsearch.client.RequestOptions
Get the wrapped Rest Client request optionsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface co.elastic.clients.transport.TransportOptions
with
-
Constructor Details
-
RestClientOptions
public RestClientOptions(org.elasticsearch.client.RequestOptions options, boolean keepResponseBodyOnException)
-
-
Method Details
-
restClientRequestOptions
public org.elasticsearch.client.RequestOptions restClientRequestOptions()Get the wrapped Rest Client request options -
headers
- Specified by:
headers
in interfaceTransportOptions
-
queryParameters
- Specified by:
queryParameters
in interfaceTransportOptions
-
onWarnings
Called if there are warnings to determine if those warnings should fail the request.- Specified by:
onWarnings
in interfaceTransportOptions
-
keepResponseBodyOnException
public boolean keepResponseBodyOnException()Description copied from interface:TransportOptions
Iftrue
, the response body inTransportException.response().body()
is guaranteed to be replayable (i.e. buffered), even if the original response was streamed. This allows inspecting the response body in case of error.- Specified by:
keepResponseBodyOnException
in interfaceTransportOptions
-
toBuilder
- Specified by:
toBuilder
in interfaceTransportOptions
-