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 TransportHttpClient
protected final Instrumentation
static final String
protected final JsonpMapper
protected 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 ElasticsearchTransportBase
cloneWith
(TransportOptions options, JsonpMapper mapper, Instrumentation instrumentation) INTERNAL, used only for tests.void
close()
final JsonpMapper
final TransportOptions
options()
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, wait
Methods 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:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Throws:
IOException
-
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)
; -
httpClient
-
performRequest
public final <RequestT,ResponseT, ResponseT performRequestErrorT> (RequestT request, Endpoint<RequestT, ResponseT, throws IOExceptionErrorT> endpoint, @Nullable TransportOptions options) - Specified by:
performRequest
in interfaceTransport
- Throws:
IOException
-
performRequestAsync
public final <RequestT,ResponseT, CompletableFuture<ResponseT> performRequestAsyncErrorT> (RequestT request, Endpoint<RequestT, ResponseT, ErrorT> endpoint, @Nullable TransportOptions options) - Specified by:
performRequestAsync
in interfaceTransport
-