Class RestClientTransport
java.lang.Object
co.elastic.clients.transport.rest_client.RestClientTransport
- All Implemented Interfaces:
ElasticsearchTransport,Transport,Closeable,AutoCloseable
-
Constructor Summary
ConstructorsConstructorDescriptionRestClientTransport(org.elasticsearch.client.RestClient restClient, JsonpMapper mapper) RestClientTransport(org.elasticsearch.client.RestClient restClient, JsonpMapper mapper, TransportOptions options) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()options()Default options used by this transport if none are provided inTransport.performRequest(Object, Endpoint, TransportOptions)orTransport.performRequestAsync(Object, Endpoint, TransportOptions);<RequestT,ResponseT, ErrorT>
ResponseTperformRequest(RequestT request, Endpoint<RequestT, ResponseT, ErrorT> endpoint, TransportOptions options) <RequestT,ResponseT, ErrorT>
CompletableFuture<ResponseT>performRequestAsync(RequestT request, Endpoint<RequestT, ResponseT, ErrorT> endpoint, TransportOptions options) org.elasticsearch.client.RestClientReturns the underlying low level Rest Client used by this transport.withRequestOptions(TransportOptions options) Copies thisRestClientTransport(org.elasticsearch.client.RestClient, co.elastic.clients.json.JsonpMapper)with specific request options.
-
Constructor Details
-
RestClientTransport
public RestClientTransport(org.elasticsearch.client.RestClient restClient, JsonpMapper mapper, @Nullable TransportOptions options) -
RestClientTransport
-
-
Method Details
-
restClient
public org.elasticsearch.client.RestClient restClient()Returns the underlying low level Rest Client used by this transport. -
withRequestOptions
Copies thisRestClientTransport(org.elasticsearch.client.RestClient, co.elastic.clients.json.JsonpMapper)with specific request options. -
jsonpMapper
- Specified by:
jsonpMapperin interfaceTransport
-
options
Description copied from interface:TransportDefault options used by this transport if none are provided inTransport.performRequest(Object, Endpoint, TransportOptions)orTransport.performRequestAsync(Object, Endpoint, TransportOptions); -
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
performRequest
public <RequestT,ResponseT, ResponseT performRequestErrorT> (RequestT request, Endpoint<RequestT, ResponseT, throws IOExceptionErrorT> endpoint, @Nullable TransportOptions options) - Specified by:
performRequestin interfaceTransport- Throws:
IOException
-
performRequestAsync
public <RequestT,ResponseT, CompletableFuture<ResponseT> performRequestAsyncErrorT> (RequestT request, Endpoint<RequestT, ResponseT, ErrorT> endpoint, @Nullable TransportOptions options) - Specified by:
performRequestAsyncin interfaceTransport
-