Package co.elastic.clients.transport
Class ElasticsearchTransportBase
java.lang.Object
co.elastic.clients.transport.ElasticsearchTransportBase
- All Implemented Interfaces:
ElasticsearchTransport,Transport,Closeable,AutoCloseable
- Direct Known Subclasses:
Rest5ClientTransport,RestClientTransport
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final TransportHttpClientprotected final Instrumentationstatic final Stringprotected final JsonpMapperprotected final TransportOptions -
Constructor Summary
ConstructorsConstructorDescriptionElasticsearchTransportBase(TransportHttpClient httpClient, TransportOptions options, JsonpMapper jsonpMapper) ElasticsearchTransportBase(TransportHttpClient httpClient, TransportOptions options, JsonpMapper jsonpMapper, Instrumentation instrumentation) -
Method Summary
Modifier and TypeMethodDescriptionprotected ElasticsearchTransportBasecloneWith(TransportOptions options, JsonpMapper mapper, Instrumentation instrumentation) INTERNAL, used only for tests.voidclose()final JsonpMapperfinal TransportOptionsoptions()Default options used by this transport if none are provided inTransport.performRequest(Object, Endpoint, TransportOptions)orTransport.performRequestAsync(Object, Endpoint, TransportOptions);final <RequestT,ResponseT, ErrorT>
ResponseTperformRequest(RequestT request, Endpoint<RequestT, ResponseT, ErrorT> endpoint, TransportOptions options) final <RequestT,ResponseT, ErrorT>
CompletableFuture<ResponseT>performRequestAsync(RequestT request, Endpoint<RequestT, ResponseT, ErrorT> endpoint, TransportOptions options) 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.Transport
withOptions, withOptions
-
Field Details
-
JSON_CONTENT_TYPE
-
httpClient
-
instrumentation
-
mapper
-
transportOptions
-
-
Constructor Details
-
ElasticsearchTransportBase
public ElasticsearchTransportBase(TransportHttpClient httpClient, TransportOptions options, JsonpMapper jsonpMapper) -
ElasticsearchTransportBase
public ElasticsearchTransportBase(TransportHttpClient httpClient, TransportOptions options, JsonpMapper jsonpMapper, @Nullable Instrumentation instrumentation)
-
-
Method Details
-
cloneWith
protected ElasticsearchTransportBase cloneWith(@Nullable TransportOptions options, @Nullable JsonpMapper mapper, @Nullable Instrumentation instrumentation) INTERNAL, used only for tests. -
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
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); -
httpClient
-
performRequest
public final <RequestT,ResponseT, ResponseT performRequestErrorT> (RequestT request, Endpoint<RequestT, ResponseT, throws IOExceptionErrorT> endpoint, @Nullable TransportOptions options) - Specified by:
performRequestin interfaceTransport- Throws:
IOException
-
performRequestAsync
public final <RequestT,ResponseT, CompletableFuture<ResponseT> performRequestAsyncErrorT> (RequestT request, Endpoint<RequestT, ResponseT, ErrorT> endpoint, @Nullable TransportOptions options) - Specified by:
performRequestAsyncin interfaceTransport
-