Class RestClientTransport
java.lang.Object
co.elastic.clients.transport.rest_client.RestClientTransport
- All Implemented Interfaces:
ElasticsearchTransport,Transport,java.io.Closeable,java.lang.AutoCloseable
public class RestClientTransport extends java.lang.Object implements ElasticsearchTransport
-
Constructor Summary
Constructors Constructor Description RestClientTransport(org.elasticsearch.client.RestClient restClient, JsonpMapper mapper)RestClientTransport(org.elasticsearch.client.RestClient restClient, JsonpMapper mapper, TransportOptions options) -
Method Summary
Modifier and Type Method Description voidclose()JsonpMapperjsonpMapper()TransportOptionsoptions()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>
java.util.concurrent.CompletableFuture<ResponseT>performRequestAsync(RequestT request, Endpoint<RequestT,ResponseT,ErrorT> endpoint, TransportOptions options)org.elasticsearch.client.RestClientrestClient()Returns the underlying low level Rest Client used by this transport.RestClientTransportwithRequestOptions(TransportOptions options)Copies thisRestClientTransport(org.elasticsearch.client.RestClient, co.elastic.clients.json.JsonpMapper)with specific request options.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
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
public void close() throws java.io.IOException- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable- Throws:
java.io.IOException
-
performRequest
public <RequestT, ResponseT, ErrorT> ResponseT performRequest(RequestT request, Endpoint<RequestT,ResponseT,ErrorT> endpoint, @Nullable TransportOptions options) throws java.io.IOException- Specified by:
performRequestin interfaceTransport- Throws:
java.io.IOException
-
performRequestAsync
public <RequestT, ResponseT, ErrorT> java.util.concurrent.CompletableFuture<ResponseT> performRequestAsync(RequestT request, Endpoint<RequestT,ResponseT,ErrorT> endpoint, @Nullable TransportOptions options)- Specified by:
performRequestAsyncin interfaceTransport
-