Class ApacheHttpClient5Transport
- java.lang.Object
-
- org.opensearch.client.transport.httpclient5.ApacheHttpClient5Transport
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable,OpenSearchTransport,Transport
public class ApacheHttpClient5Transport extends java.lang.Object implements OpenSearchTransport
Apache HttpClient 5 based client transport.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classApacheHttpClient5Transport.ContentCompressingEntityA gzip compressing entity that also implementsgetContent().static classApacheHttpClient5Transport.ContentHttpEntityAn entity that lets the caller specify the return value ofisChunked().static classApacheHttpClient5Transport.FailureListenerListener that allows to be notified whenever a failure happens.
-
Constructor Summary
Constructors Constructor Description ApacheHttpClient5Transport(org.apache.hc.client5.http.impl.async.CloseableHttpAsyncClient client, org.apache.hc.core5.http.Header[] defaultHeaders, java.util.List<Node> nodes, JsonpMapper mapper, TransportOptions options, java.lang.String pathPrefix, ApacheHttpClient5Transport.FailureListener failureListener, NodeSelector nodeSelector, boolean strictDeprecationMode, boolean compressionEnabled, boolean chunkedEnabled)
-
Method Summary
All Methods Instance Methods Concrete Methods 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)
-
-
-
Constructor Detail
-
ApacheHttpClient5Transport
public ApacheHttpClient5Transport(org.apache.hc.client5.http.impl.async.CloseableHttpAsyncClient client, org.apache.hc.core5.http.Header[] defaultHeaders, java.util.List<Node> nodes, JsonpMapper mapper, @Nullable TransportOptions options, java.lang.String pathPrefix, ApacheHttpClient5Transport.FailureListener failureListener, NodeSelector nodeSelector, boolean strictDeprecationMode, boolean compressionEnabled, boolean chunkedEnabled)
-
-
Method Detail
-
performRequest
public <RequestT,ResponseT,ErrorT> ResponseT performRequest(RequestT request, Endpoint<RequestT,ResponseT,ErrorT> endpoint, 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, TransportOptions options)- Specified by:
performRequestAsyncin interfaceTransport
-
jsonpMapper
public JsonpMapper jsonpMapper()
- Specified by:
jsonpMapperin interfaceTransport
-
options
public TransportOptions 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
-
-