public class HttpClient4ClientFactory extends Object implements ClientFactory
ClientFactory that creates a single Apache HTTP Components DefaultHttpClient
instance using a PoolingClientConnectionManager to provide pooling and thread safety, and returns this
wrapped in a HttpClient4Client instance in response to all requests tp getClient(Account).| Modifier and Type | Field and Description |
|---|---|
static boolean |
DEFAULT_ALLOW_REDIRECTS |
static int |
DEFAULT_CONNECTION_MANAGER_TIMEOUT_MS |
static int |
DEFAULT_CONNECTION_TIMEOUT_MS |
static int |
DEFAULT_MAX_CONNECTIONS |
static int |
DEFAULT_MAX_CONNECTIONS_PER_ROUTE |
static int |
DEFAULT_SOCKET_TIMEOUT_MS |
| Modifier and Type | Method and Description |
|---|---|
Client |
getClient(Account account)
Returns the same instance of
HttpClient4Client, backed by a DefaultHttpClient instance using a
thread-safe pooled connection manager, in response to every request. |
public static final int DEFAULT_MAX_CONNECTIONS
public static final int DEFAULT_MAX_CONNECTIONS_PER_ROUTE
public static final int DEFAULT_CONNECTION_MANAGER_TIMEOUT_MS
public static final int DEFAULT_CONNECTION_TIMEOUT_MS
public static final int DEFAULT_SOCKET_TIMEOUT_MS
public static final boolean DEFAULT_ALLOW_REDIRECTS
public Client getClient(Account account)
HttpClient4Client, backed by a DefaultHttpClient instance using a
thread-safe pooled connection manager, in response to every request.getClient in interface ClientFactoryaccount - The Brightpearl customer account a client is required for.HttpClient4Client instance.Copyright © 2014. All Rights Reserved.