org.apache.http.conn.params
Class ConnManagerParams

java.lang.Object
  extended by org.apache.http.conn.params.ConnManagerParams
All Implemented Interfaces:
ConnManagerPNames

@Immutable
public final class ConnManagerParams
extends Object
implements ConnManagerPNames

An adaptor for manipulating HTTP connection management parameters in HttpParams.

Since:
4.0
See Also:
ConnManagerPNames

Field Summary
static int DEFAULT_MAX_TOTAL_CONNECTIONS
          The default maximum number of connections allowed overall
 
Fields inherited from interface org.apache.http.conn.params.ConnManagerPNames
MAX_CONNECTIONS_PER_ROUTE, MAX_TOTAL_CONNECTIONS, TIMEOUT
 
Constructor Summary
ConnManagerParams()
           
 
Method Summary
static ConnPerRoute getMaxConnectionsPerRoute(HttpParams params)
          Returns lookup interface for maximum number of connections allowed per route.
static int getMaxTotalConnections(HttpParams params)
          Gets the maximum number of connections allowed.
static long getTimeout(HttpParams params)
          Returns the timeout in milliseconds used when retrieving a ManagedClientConnection from the ClientConnectionManager.
static void setMaxConnectionsPerRoute(HttpParams params, ConnPerRoute connPerRoute)
          Sets lookup interface for maximum number of connections allowed per route.
static void setMaxTotalConnections(HttpParams params, int maxTotalConnections)
          Sets the maximum number of connections allowed.
static void setTimeout(HttpParams params, long timeout)
          Sets the timeout in milliseconds used when retrieving a ManagedClientConnection from the ClientConnectionManager.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_MAX_TOTAL_CONNECTIONS

public static final int DEFAULT_MAX_TOTAL_CONNECTIONS
The default maximum number of connections allowed overall

See Also:
Constant Field Values
Constructor Detail

ConnManagerParams

public ConnManagerParams()
Method Detail

getTimeout

public static long getTimeout(HttpParams params)
Returns the timeout in milliseconds used when retrieving a ManagedClientConnection from the ClientConnectionManager.

Returns:
timeout in milliseconds.

setTimeout

public static void setTimeout(HttpParams params,
                              long timeout)
Sets the timeout in milliseconds used when retrieving a ManagedClientConnection from the ClientConnectionManager.

Parameters:
timeout - the timeout in milliseconds

setMaxConnectionsPerRoute

public static void setMaxConnectionsPerRoute(HttpParams params,
                                             ConnPerRoute connPerRoute)
Sets lookup interface for maximum number of connections allowed per route.

Parameters:
params - HTTP parameters
connPerRoute - lookup interface for maximum number of connections allowed per route
See Also:
ConnManagerPNames.MAX_CONNECTIONS_PER_ROUTE

getMaxConnectionsPerRoute

public static ConnPerRoute getMaxConnectionsPerRoute(HttpParams params)
Returns lookup interface for maximum number of connections allowed per route.

Parameters:
params - HTTP parameters
Returns:
lookup interface for maximum number of connections allowed per route.
See Also:
ConnManagerPNames.MAX_CONNECTIONS_PER_ROUTE

setMaxTotalConnections

public static void setMaxTotalConnections(HttpParams params,
                                          int maxTotalConnections)
Sets the maximum number of connections allowed.

Parameters:
params - HTTP parameters
maxTotalConnections - The maximum number of connections allowed.
See Also:
ConnManagerPNames.MAX_TOTAL_CONNECTIONS

getMaxTotalConnections

public static int getMaxTotalConnections(HttpParams params)
Gets the maximum number of connections allowed.

Parameters:
params - HTTP parameters
Returns:
The maximum number of connections allowed.
See Also:
ConnManagerPNames.MAX_TOTAL_CONNECTIONS


Copyright © 1999-2010 Apache Software Foundation. All Rights Reserved.