Class Executor

java.lang.Object
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 Details

    • newInstance

      public static Executor newInstance()
    • newInstance

      public static Executor newInstance(org.apache.http.client.HttpClient httpclient)
    • use

      public Executor use(org.apache.http.client.CredentialsProvider credentialsProvider)
      Since:
      4.5
    • auth

      public Executor auth(org.apache.http.auth.AuthScope authScope, org.apache.http.auth.Credentials creds)
    • auth

      public Executor auth(org.apache.http.HttpHost host, org.apache.http.auth.Credentials creds)
    • auth

      public Executor auth(String host, org.apache.http.auth.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(org.apache.http.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(org.apache.http.client.CookieStore cookieStore)
      Deprecated.
      (4.5) Use use(CookieStore).
    • use

      public Executor use(org.apache.http.client.CookieStore cookieStore)
      Since:
      4.5
    • clearCookies

      public Executor clearCookies()
    • execute

      public Response execute(Request request) throws org.apache.http.client.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:
      org.apache.http.client.ClientProtocolException
      IOException
      See Also:
    • registerScheme

      @Deprecated public static void registerScheme(org.apache.http.conn.scheme.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