org.apache.http.client.fluent
Class Executor

java.lang.Object
  extended by org.apache.http.client.fluent.Executor

public class Executor
extends 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
 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, String username, String password)
           
 Executor auth(org.apache.http.HttpHost host, String username, String password, String workstation, String domain)
           
 Executor auth(String host, Credentials creds)
           
 Executor auth(String username, String password)
           
 Executor auth(String username, String password, String workstation, String domain)
           
 Executor authPreemptive(org.apache.http.HttpHost host)
           
 Executor authPreemptive(String host)
           
 Executor authPreemptiveProxy(org.apache.http.HttpHost proxy)
           
 Executor authPreemptiveProxy(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(String name)
          Deprecated. (4.3) do not use.
 Executor use(CookieStore cookieStore)
           
 Executor use(CredentialsProvider credentialsProvider)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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(org.apache.http.HttpHost host,
                     Credentials creds)

auth

public Executor auth(String host,
                     Credentials creds)
Since:
4.4

authPreemptive

public Executor authPreemptive(org.apache.http.HttpHost host)

authPreemptive

public Executor authPreemptive(String host)
Since:
4.4

authPreemptiveProxy

public Executor authPreemptiveProxy(org.apache.http.HttpHost proxy)

authPreemptiveProxy

public Executor authPreemptiveProxy(String proxy)
Since:
4.4

auth

public Executor auth(Credentials cred)

auth

public Executor auth(String username,
                     String password)

auth

public Executor auth(String username,
                     String password,
                     String workstation,
                     String domain)

auth

public Executor auth(org.apache.http.HttpHost host,
                     String username,
                     String password)

auth

public Executor auth(org.apache.http.HttpHost host,
                     String username,
                     String password,
                     String workstation,
                     String domain)

clearAuth

public Executor clearAuth()

cookieStore

@Deprecated
public Executor cookieStore(CookieStore cookieStore)
Deprecated. (4.5) Use use(CookieStore).


use

public Executor use(CookieStore cookieStore)
Since:
4.5

clearCookies

public Executor clearCookies()

execute

public Response execute(Request request)
                 throws ClientProtocolException,
                        IOException
Executes the request. Please Note that response content must be processed or discarded using Response.discardContent(), otherwise the connection used for the request might not be released to the pool.

Throws:
ClientProtocolException
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(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


Copyright © 2011–2020 The Apache Software Foundation. All rights reserved.