Class Executor
- java.lang.Object
-
- org.apache.hc.client5.http.fluent.Executor
-
public class Executor extends java.lang.ObjectExecutor forRequests.A connection pool with maximum 100 connections per route and a total maximum of 200 connections is used internally.
- Since:
- 4.2
-
-
Field Summary
Fields Modifier and Type Field Description private AuthCacheauthCache(package private) static CloseableHttpClientCLIENTprivate CookieStorecookieStoreprivate CredentialsStorecredentialsStoreprivate CloseableHttpClienthttpclient
-
Constructor Summary
Constructors Constructor Description Executor(CloseableHttpClient httpclient)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description Executorauth(java.lang.String host, Credentials credentials)Executorauth(AuthScope authScope, Credentials credentials)Executorauth(org.apache.hc.core5.http.HttpHost host, java.lang.String username, char[] password)Executorauth(org.apache.hc.core5.http.HttpHost host, java.lang.String username, char[] password, java.lang.String workstation, java.lang.String domain)Deprecated.Executorauth(org.apache.hc.core5.http.HttpHost host, Credentials credentials)ExecutorauthPreemptive(java.lang.String host)ExecutorauthPreemptive(org.apache.hc.core5.http.HttpHost host)ExecutorauthPreemptiveProxy(java.lang.String proxy)ExecutorauthPreemptiveProxy(org.apache.hc.core5.http.HttpHost proxy)ExecutorclearAuth()ExecutorclearCookies()Responseexecute(Request request)Executes the request.static ExecutornewInstance()static ExecutornewInstance(CloseableHttpClient httpclient)Executoruse(CredentialsStore credentialsStore)Executoruse(CookieStore cookieStore)
-
-
-
Field Detail
-
CLIENT
static final CloseableHttpClient CLIENT
-
httpclient
private final CloseableHttpClient httpclient
-
authCache
private final AuthCache authCache
-
credentialsStore
private volatile CredentialsStore credentialsStore
-
cookieStore
private volatile CookieStore cookieStore
-
-
Constructor Detail
-
Executor
Executor(CloseableHttpClient httpclient)
-
-
Method Detail
-
newInstance
public static Executor newInstance()
-
newInstance
public static Executor newInstance(CloseableHttpClient httpclient)
-
use
public Executor use(CredentialsStore credentialsStore)
- Since:
- 4.5
-
auth
public Executor auth(AuthScope authScope, Credentials credentials)
-
auth
public Executor auth(org.apache.hc.core5.http.HttpHost host, Credentials credentials)
-
auth
public Executor auth(java.lang.String host, Credentials credentials)
- Since:
- 4.4
-
authPreemptive
public Executor authPreemptive(org.apache.hc.core5.http.HttpHost host)
-
authPreemptive
public Executor authPreemptive(java.lang.String host)
- Since:
- 4.4
-
authPreemptiveProxy
public Executor authPreemptiveProxy(org.apache.hc.core5.http.HttpHost proxy)
-
authPreemptiveProxy
public Executor authPreemptiveProxy(java.lang.String proxy)
- Since:
- 4.4
-
auth
public Executor auth(org.apache.hc.core5.http.HttpHost host, java.lang.String username, char[] password)
-
auth
@Deprecated public Executor auth(org.apache.hc.core5.http.HttpHost host, java.lang.String username, char[] password, java.lang.String workstation, java.lang.String domain)
Deprecated.
-
clearAuth
public Executor clearAuth()
-
use
public Executor use(CookieStore cookieStore)
- Since:
- 4.5
-
clearCookies
public Executor clearCookies()
-
execute
public Response execute(Request request) throws java.io.IOException
Executes the request. Please Note that response content must be processed or discarded usingResponse.discardContent(), otherwise the connection used for the request might not be released to the pool.- Throws:
java.io.IOException- See Also:
Response.handleResponse(org.apache.hc.core5.http.io.HttpClientResponseHandler),Response.discardContent()
-
-