SMILA 1.0 API documentation

org.eclipse.smila.http.client.util
Class HttpClientUtil

java.lang.Object
  extended by org.eclipse.smila.http.client.util.HttpClientUtil

public final class HttpClientUtil
extends java.lang.Object

Utility class for HttpClient instance creation. Use this class instead of direct HttpClient constructor calls.

Since:
1.1.0

Method Summary
static HttpClient createInstance()
          Create a new HttpClient instance with default settings and HttpMethodRetry disabled.
static HttpClient createInstance(ClientConnectionManager connectionManager)
          Create a new HttpClient instance with default settings using the given ClientConnectionManager and with HttpMethodRetry disabled.
static ClientConnectionManager createThreadSafeConnectionManager()
          Create a default connection manager usable for multithreading.
static ClientConnectionManager createThreadSafeConnectionManager(int maxTotalConnections, int maxConnectionsPerHost)
          Create a default connection manager usable for multithreading with given connection limits.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

createInstance

public static HttpClient createInstance()
Create a new HttpClient instance with default settings and HttpMethodRetry disabled.


createInstance

public static HttpClient createInstance(ClientConnectionManager connectionManager)
Create a new HttpClient instance with default settings using the given ClientConnectionManager and with HttpMethodRetry disabled.

Parameters:
connectionManager - the ClientConnectionManager to use
Returns:
a new HttpClient instance

createThreadSafeConnectionManager

public static ClientConnectionManager createThreadSafeConnectionManager()
Create a default connection manager usable for multithreading.


createThreadSafeConnectionManager

public static ClientConnectionManager createThreadSafeConnectionManager(int maxTotalConnections,
                                                                        int maxConnectionsPerHost)
Create a default connection manager usable for multithreading with given connection limits.


SMILA 1.0 API documentation