public class Executor
extends java.lang.Object
A PoolingHttpClientConnectionManager
with maximum 100 connections per route and
a total maximum of 200 connections is used internally.
Modifier and Type | Field and Description |
---|---|
private AuthCache |
authCache |
(package private) static HttpClient |
CLIENT |
(package private) static PoolingHttpClientConnectionManager |
CONNMGR |
private CookieStore |
cookieStore |
private CredentialsProvider |
credentialsProvider |
private HttpClient |
httpclient |
Constructor and Description |
---|
Executor(HttpClient httpclient) |
Modifier and Type | Method and Description |
---|---|
Executor |
auth(AuthScope authScope,
Credentials creds) |
Executor |
auth(Credentials cred) |
Executor |
auth(org.apache.http.HttpHost host,
Credentials creds) |
Executor |
auth(org.apache.http.HttpHost host,
java.lang.String username,
java.lang.String password) |
Executor |
auth(org.apache.http.HttpHost host,
java.lang.String username,
java.lang.String password,
java.lang.String workstation,
java.lang.String domain) |
Executor |
auth(java.lang.String host,
Credentials creds) |
Executor |
auth(java.lang.String username,
java.lang.String password) |
Executor |
auth(java.lang.String username,
java.lang.String password,
java.lang.String workstation,
java.lang.String domain) |
Executor |
authPreemptive(org.apache.http.HttpHost host) |
Executor |
authPreemptive(java.lang.String host) |
Executor |
authPreemptiveProxy(org.apache.http.HttpHost proxy) |
Executor |
authPreemptiveProxy(java.lang.String proxy) |
Executor |
clearAuth() |
Executor |
clearCookies() |
static void |
closeIdleConnections()
Closes all idle persistent connections used by the internal pool.
|
Executor |
cookieStore(CookieStore cookieStore)
Deprecated.
(4.5) Use
use(CookieStore) . |
Response |
execute(Request request)
Executes the request.
|
static Executor |
newInstance() |
static Executor |
newInstance(HttpClient httpclient) |
static void |
registerScheme(Scheme scheme)
Deprecated.
(4.3) do not use.
|
static void |
unregisterScheme(java.lang.String name)
Deprecated.
(4.3) do not use.
|
Executor |
use(CookieStore cookieStore) |
Executor |
use(CredentialsProvider credentialsProvider) |
static final PoolingHttpClientConnectionManager CONNMGR
static final HttpClient CLIENT
private final HttpClient httpclient
private volatile AuthCache authCache
private volatile CredentialsProvider credentialsProvider
private volatile CookieStore cookieStore
Executor(HttpClient httpclient)
public static Executor newInstance()
public static Executor newInstance(HttpClient httpclient)
public Executor use(CredentialsProvider credentialsProvider)
public Executor auth(AuthScope authScope, Credentials creds)
public Executor auth(org.apache.http.HttpHost host, Credentials creds)
public Executor auth(java.lang.String host, Credentials creds)
public Executor authPreemptive(org.apache.http.HttpHost host)
public Executor authPreemptive(java.lang.String host)
public Executor authPreemptiveProxy(org.apache.http.HttpHost proxy)
public Executor authPreemptiveProxy(java.lang.String proxy)
public Executor auth(Credentials cred)
public Executor auth(java.lang.String username, java.lang.String password)
public Executor auth(java.lang.String username, java.lang.String password, java.lang.String workstation, java.lang.String domain)
public Executor auth(org.apache.http.HttpHost host, java.lang.String username, java.lang.String password)
public Executor auth(org.apache.http.HttpHost host, java.lang.String username, java.lang.String password, java.lang.String workstation, java.lang.String domain)
public Executor clearAuth()
@Deprecated public Executor cookieStore(CookieStore cookieStore)
use(CookieStore)
.public Executor use(CookieStore cookieStore)
public Executor clearCookies()
public Response execute(Request request) throws ClientProtocolException, java.io.IOException
Response.discardContent()
, otherwise the
connection used for the request might not be released to the pool.ClientProtocolException
java.io.IOException
Response.handleResponse(org.apache.http.client.ResponseHandler)
,
Response.discardContent()
@Deprecated public static void registerScheme(Scheme scheme)
@Deprecated public static void unregisterScheme(java.lang.String name)
public static void closeIdleConnections()