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) RestClientOptions(org.elasticsearch.client.RequestOptions options, boolean keepResponseBodyOnException, RetryConfig retryConfig) -
Method Summary
Modifier and TypeMethodDescriptionheaders()booleanIftrue, the response body inTransportException.response().body()is guaranteed to be replayable (i.e.static RestClientOptionsof(TransportOptions options) Called if there are warnings to determine if those warnings should fail the request.org.elasticsearch.client.RequestOptionsGet the wrapped Rest Client request optionsConfiguration for transport-level retries (I/O exceptions and configurable HTTP status codes).voidupdateToken(String token) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface co.elastic.clients.transport.TransportOptions
with
-
Constructor Details
-
RestClientOptions
public RestClientOptions(org.elasticsearch.client.RequestOptions options, boolean keepResponseBodyOnException) -
RestClientOptions
public RestClientOptions(org.elasticsearch.client.RequestOptions options, boolean keepResponseBodyOnException, RetryConfig retryConfig)
-
-
Method Details
-
of
-
restClientRequestOptions
public org.elasticsearch.client.RequestOptions restClientRequestOptions()Get the wrapped Rest Client request options -
headers
- Specified by:
headersin interfaceTransportOptions
-
queryParameters
- Specified by:
queryParametersin interfaceTransportOptions
-
onWarnings
Called if there are warnings to determine if those warnings should fail the request.- Specified by:
onWarningsin interfaceTransportOptions
-
updateToken
- Specified by:
updateTokenin interfaceTransportOptions
-
keepResponseBodyOnException
public boolean keepResponseBodyOnException()Description copied from interface:TransportOptionsIftrue, 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:
keepResponseBodyOnExceptionin interfaceTransportOptions
-
retryConfig
Description copied from interface:TransportOptionsConfiguration for transport-level retries (I/O exceptions and configurable HTTP status codes). Defaults toRetryConfig.disabled(), i.e. no retries.- Specified by:
retryConfigin interfaceTransportOptions
-
toBuilder
- Specified by:
toBuilderin interfaceTransportOptions
-