Class MinimalHttpClient
java.lang.Object
org.apache.hc.client5.http.impl.classic.CloseableHttpClient
org.apache.hc.client5.http.impl.classic.MinimalHttpClient
- All Implemented Interfaces:
Closeable, AutoCloseable, HttpClient, org.apache.hc.core5.io.ModalCloseable
Minimal implementation of
CloseableHttpClient. This client is
optimized for HTTP/1.1 message transport and does not support advanced
HTTP protocol functionality such as request execution via a proxy, state
management, authentication and request redirects.
Concurrent message exchanges executed by this client will get assigned to separate connections leased from the connection pool.
- Since:
- 4.3
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final HttpClientConnectionManagerprivate final org.apache.hc.core5.http.protocol.HttpProcessorprivate static final org.slf4j.Loggerprivate final org.apache.hc.core5.http.impl.io.HttpRequestExecutorprivate final org.apache.hc.core5.http.ConnectionReuseStrategyprivate final SchemePortResolver -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()voidclose(org.apache.hc.core5.io.CloseMode closeMode) protected CloseableHttpResponsedoExecute(org.apache.hc.core5.http.HttpHost target, org.apache.hc.core5.http.ClassicHttpRequest request, org.apache.hc.core5.http.protocol.HttpContext context) Methods inherited from class CloseableHttpClient
execute, execute, execute, execute, execute, execute, execute, executeMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface HttpClient
executeOpen
-
Field Details
-
LOG
private static final org.slf4j.Logger LOG -
connManager
-
reuseStrategy
private final org.apache.hc.core5.http.ConnectionReuseStrategy reuseStrategy -
schemePortResolver
-
requestExecutor
private final org.apache.hc.core5.http.impl.io.HttpRequestExecutor requestExecutor -
httpProcessor
private final org.apache.hc.core5.http.protocol.HttpProcessor httpProcessor
-
-
Constructor Details
-
MinimalHttpClient
MinimalHttpClient(HttpClientConnectionManager connManager)
-
-
Method Details
-
doExecute
protected CloseableHttpResponse doExecute(org.apache.hc.core5.http.HttpHost target, org.apache.hc.core5.http.ClassicHttpRequest request, org.apache.hc.core5.http.protocol.HttpContext context) throws IOException - Specified by:
doExecutein classCloseableHttpClient- Throws:
IOException
-
close
- Throws:
IOException
-
close
public void close(org.apache.hc.core5.io.CloseMode closeMode)
-