Methods Summary |
---|
public static org.apache.http.conn.params.ConnPerRoute | getMaxConnectionsPerRoute(org.apache.http.params.HttpParams params)Returns lookup interface for maximum number of connections allowed per route.
if (params == null) {
throw new IllegalArgumentException
("HTTP parameters must not be null.");
}
ConnPerRoute connPerRoute = (ConnPerRoute) params.getParameter(MAX_CONNECTIONS_PER_ROUTE);
if (connPerRoute == null) {
connPerRoute = DEFAULT_CONN_PER_ROUTE;
}
return connPerRoute;
|
public static int | getMaxTotalConnections(org.apache.http.params.HttpParams params)Gets the maximum number of connections allowed.
if (params == null) {
throw new IllegalArgumentException
("HTTP parameters must not be null.");
}
return params.getIntParameter(MAX_TOTAL_CONNECTIONS, DEFAULT_MAX_TOTAL_CONNECTIONS);
|
public static long | getTimeout(org.apache.http.params.HttpParams params)Returns the timeout in milliseconds used when retrieving a
{@link org.apache.http.conn.ManagedClientConnection} from the
{@link org.apache.http.conn.ClientConnectionManager}.
if (params == null) {
throw new IllegalArgumentException("HTTP parameters may not be null");
}
return params.getLongParameter(TIMEOUT, 0);
|
public static void | setMaxConnectionsPerRoute(org.apache.http.params.HttpParams params, org.apache.http.conn.params.ConnPerRoute connPerRoute)Sets lookup interface for maximum number of connections allowed per route.
if (params == null) {
throw new IllegalArgumentException
("HTTP parameters must not be null.");
}
params.setParameter(MAX_CONNECTIONS_PER_ROUTE, connPerRoute);
|
public static void | setMaxTotalConnections(org.apache.http.params.HttpParams params, int maxTotalConnections)Sets the maximum number of connections allowed.
if (params == null) {
throw new IllegalArgumentException
("HTTP parameters must not be null.");
}
params.setIntParameter(MAX_TOTAL_CONNECTIONS, maxTotalConnections);
|
public static void | setTimeout(org.apache.http.params.HttpParams params, long timeout)Sets the timeout in milliseconds used when retrieving a
{@link org.apache.http.conn.ManagedClientConnection} from the
{@link org.apache.http.conn.ClientConnectionManager}.
if (params == null) {
throw new IllegalArgumentException("HTTP parameters may not be null");
}
params.setLongParameter(TIMEOUT, timeout);
|