## org.apache.http.conn.params
Class ConnPerRouteBean

    java.lang.Object
      org.apache.http.conn.params.ConnPerRouteBean

All Implemented Interfaces:
  ConnPerRoute

    @ThreadSafe
    public final class ConnPerRouteBean

extends Object
implements ConnPerRoute

This class maintains a map of HTTP routes to maximum number of connections allowed for those routes. This class can be used by pooling `connection managers` for a fine-grained control of connections on a per route basis.

Since:
  4.0

Field Summary
`static int` `DEFAULT_MAX_CONNECTIONS_PER_ROUTE` The default maximum number of connections allowed per host

Constructor Summary
`ConnPerRouteBean()`
`ConnPerRouteBean(int defaultMax)`

Method Summary
`int` `getDefaultMax()` Deprecated. Use `getDefaultMaxPerRoute()` instead
`int` `getDefaultMaxPerRoute()`
`int` `getMaxForRoute(HttpRoute route)`
`void` `setDefaultMaxPerRoute(int max)`
`void` `setMaxForRoute(HttpRoute route, int max)`
`void` `setMaxForRoutes(Map<HttpRoute,Integer> map)`
`String` `toString()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### DEFAULT_MAX_CONNECTIONS_PER_ROUTE

    public static final int DEFAULT_MAX_CONNECTIONS_PER_ROUTE

  The default maximum number of connections allowed per host

  See Also:
    Constant Field Values

Constructor Detail

### ConnPerRouteBean

    public ConnPerRouteBean(int defaultMax)

### ConnPerRouteBean

    public ConnPerRouteBean()

Method Detail

### getDefaultMax

    @Deprecated
    public int getDefaultMax()

  Deprecated. Use `getDefaultMaxPerRoute()` instead

### getDefaultMaxPerRoute

    public int getDefaultMaxPerRoute()

  Since:
    4.1

### setDefaultMaxPerRoute

    public void setDefaultMaxPerRoute(int max)

### setMaxForRoute

    public void setMaxForRoute(HttpRoute route,
                               int max)

### getMaxForRoute

    public int getMaxForRoute(HttpRoute route)

  Specified by:
    `getMaxForRoute` in interface `ConnPerRoute`

### setMaxForRoutes

    public void setMaxForRoutes(Map<HttpRoute,Integer> map)

### toString

    public String toString()

  Overrides:
    `toString` in class `Object`

Copyright © 1999-2012 The Apache Software Foundation. All Rights Reserved.