Package org.apache.http.conn.params
Class ConnManagerParams
java.lang.Object
org.apache.http.conn.params.ConnManagerParams
- All Implemented Interfaces:
ConnManagerPNames
public final class ConnManagerParams extends Object implements ConnManagerPNames
This class represents a collection of HTTP protocol parameters applicable
to client-side
connection managers.- Since:
- 4.0
- Version:
- $Revision: 658785 $
- Author:
- Oleg Kalnichevski, Michael Becke
- See Also:
ConnManagerPNames
-
Field Summary
Fields Modifier and Type Field Description static intDEFAULT_MAX_TOTAL_CONNECTIONSThe default maximum number of connections allowed overallFields inherited from interface org.apache.http.conn.params.ConnManagerPNames
MAX_CONNECTIONS_PER_ROUTE, MAX_TOTAL_CONNECTIONS, TIMEOUT -
Constructor Summary
Constructors Constructor Description ConnManagerParams() -
Method Summary
Modifier and Type Method Description static ConnPerRoutegetMaxConnectionsPerRoute(HttpParams params)Returns lookup interface for maximum number of connections allowed per route.static intgetMaxTotalConnections(HttpParams params)Gets the maximum number of connections allowed.static longgetTimeout(HttpParams params)Returns the timeout in milliseconds used when retrieving aManagedClientConnectionfrom theClientConnectionManager.static voidsetMaxConnectionsPerRoute(HttpParams params, ConnPerRoute connPerRoute)Sets lookup interface for maximum number of connections allowed per route.static voidsetMaxTotalConnections(HttpParams params, int maxTotalConnections)Sets the maximum number of connections allowed.static voidsetTimeout(HttpParams params, long timeout)Sets the timeout in milliseconds used when retrieving aManagedClientConnectionfrom theClientConnectionManager.
-
Field Details
-
DEFAULT_MAX_TOTAL_CONNECTIONS
public static final int DEFAULT_MAX_TOTAL_CONNECTIONSThe default maximum number of connections allowed overall- See Also:
- Constant Field Values
-
-
Constructor Details
-
ConnManagerParams
public ConnManagerParams()
-
-
Method Details
-
getTimeout
Returns the timeout in milliseconds used when retrieving aManagedClientConnectionfrom theClientConnectionManager.- Returns:
- timeout in milliseconds.
-
setTimeout
Sets the timeout in milliseconds used when retrieving aManagedClientConnectionfrom theClientConnectionManager.- Parameters:
timeout- the timeout in milliseconds
-
setMaxConnectionsPerRoute
Sets lookup interface for maximum number of connections allowed per route.- Parameters:
params- HTTP parametersconnPerRoute- lookup interface for maximum number of connections allowed per route- See Also:
ConnManagerPNames.MAX_CONNECTIONS_PER_ROUTE
-
getMaxConnectionsPerRoute
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
Sets the maximum number of connections allowed.- Parameters:
params- HTTP parametersmaxTotalConnections- The maximum number of connections allowed.- See Also:
ConnManagerPNames.MAX_TOTAL_CONNECTIONS
-
getMaxTotalConnections
Gets the maximum number of connections allowed.- Parameters:
params- HTTP parameters- Returns:
- The maximum number of connections allowed.
- See Also:
ConnManagerPNames.MAX_TOTAL_CONNECTIONS
-