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 Details

    • 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 Details

    • ConnManagerParams

      public ConnManagerParams()
  • Method Details

    • 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