Package org.apache.http.client.fluent
Class Executor
- java.lang.Object
-
- org.apache.http.client.fluent.Executor
-
public class Executor extends java.lang.Object
An Executor for fluent requests.A
PoolingHttpClientConnectionManager
with maximum 100 connections per route and a total maximum of 200 connections is used internally.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description 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
auth(java.lang.String host, Credentials creds)
Executor
auth(AuthScope authScope, Credentials creds)
Executor
auth(Credentials cred)
Executor
auth(HttpHost host, java.lang.String username, java.lang.String password)
Executor
auth(HttpHost host, java.lang.String username, java.lang.String password, java.lang.String workstation, java.lang.String domain)
Executor
auth(HttpHost host, Credentials creds)
Executor
authPreemptive(java.lang.String host)
Executor
authPreemptive(HttpHost host)
Executor
authPreemptiveProxy(java.lang.String proxy)
Executor
authPreemptiveProxy(HttpHost 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) Useuse(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)
-
-
-
Method Detail
-
newInstance
public static Executor newInstance()
-
newInstance
public static Executor newInstance(HttpClient httpclient)
-
use
public Executor use(CredentialsProvider credentialsProvider)
- Since:
- 4.5
-
auth
public Executor auth(AuthScope authScope, Credentials creds)
-
auth
public Executor auth(HttpHost host, Credentials creds)
-
auth
public Executor auth(java.lang.String host, Credentials creds)
- Since:
- 4.4
-
authPreemptive
public Executor authPreemptive(java.lang.String host)
- Since:
- 4.4
-
authPreemptiveProxy
public Executor authPreemptiveProxy(java.lang.String proxy)
- Since:
- 4.4
-
auth
public Executor auth(Credentials cred)
-
auth
public Executor auth(java.lang.String username, java.lang.String password)
-
auth
public Executor auth(java.lang.String username, java.lang.String password, java.lang.String workstation, java.lang.String domain)
-
auth
public Executor auth(HttpHost host, java.lang.String username, java.lang.String password, java.lang.String workstation, java.lang.String domain)
-
clearAuth
public Executor clearAuth()
-
cookieStore
@Deprecated public Executor cookieStore(CookieStore cookieStore)
Deprecated.(4.5) Useuse(CookieStore)
.
-
use
public Executor use(CookieStore cookieStore)
- Since:
- 4.5
-
clearCookies
public Executor clearCookies()
-
execute
public Response execute(Request request) throws ClientProtocolException, 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:
ClientProtocolException
java.io.IOException
- See Also:
Response.handleResponse(org.apache.http.client.ResponseHandler)
,Response.discardContent()
-
registerScheme
@Deprecated public static void registerScheme(Scheme scheme)
Deprecated.(4.3) do not use.
-
unregisterScheme
@Deprecated public static void unregisterScheme(java.lang.String name)
Deprecated.(4.3) do not use.
-
closeIdleConnections
public static void closeIdleConnections()
Closes all idle persistent connections used by the internal pool.- Since:
- 4.4
-
-