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 void
close()
JsonpMapper
jsonpMapper()
TransportOptions
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>
java.util.concurrent.CompletableFuture<ResponseT>performRequestAsync(RequestT request, Endpoint<RequestT,ResponseT,ErrorT> endpoint, TransportOptions options)
org.elasticsearch.client.RestClient
restClient()
Returns the underlying low level Rest Client used by this transport.RestClientTransport
withRequestOptions(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:
jsonpMapper
in interfaceTransport
-
options
Description copied from interface:Transport
Default 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:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in 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:
performRequest
in 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:
performRequestAsync
in interfaceTransport
-