Package co.elastic.clients.transport
Interface Transport
- All Superinterfaces:
AutoCloseable,Closeable
- All Known Subinterfaces:
ElasticsearchTransport
- All Known Implementing Classes:
ElasticsearchTransportBase,Rest5ClientTransport,RestClientTransport
The transport layer that allows
ApiClients to send requests.-
Method Summary
Modifier and TypeMethodDescriptionoptions()Default options used by this transport if none are provided inperformRequest(Object, Endpoint, TransportOptions)orperformRequestAsync(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) default TransportwithOptions(TransportOptions options) Clone this transport with new options.default TransportClone this transport with additional options.
-
Method Details
-
performRequest
<RequestT,ResponseT, ResponseT performRequestErrorT> (RequestT request, Endpoint<RequestT, ResponseT, throws IOExceptionErrorT> endpoint, @Nullable TransportOptions options) - Throws:
IOException
-
performRequestAsync
<RequestT,ResponseT, CompletableFuture<ResponseT> performRequestAsyncErrorT> (RequestT request, Endpoint<RequestT, ResponseT, ErrorT> endpoint, @Nullable TransportOptions options) -
jsonpMapper
JsonpMapper jsonpMapper() -
options
TransportOptions options()Default options used by this transport if none are provided inperformRequest(Object, Endpoint, TransportOptions)orperformRequestAsync(Object, Endpoint, TransportOptions); -
withOptions
Clone this transport with new options.- Throws:
UnsupportedOperationException
-
withOptions
Clone this transport with additional options. The lambda expression is provided an options builder initialized with the transport's current options.- Parameters:
fn- a lambda expression that takes the current options as input- Throws:
UnsupportedOperationException
-