org.apache.jmeter.protocol.http.sampler

## Class MeasuringConnectionManager

- java.lang.Object
- - org.apache.jmeter.protocol.http.sampler.hc.JMeterPoolingClientConnectionManager
  - - org.apache.jmeter.protocol.http.sampler.MeasuringConnectionManager

- All Implemented Interfaces:
    org.apache.http.conn.ClientConnectionManager, org.apache.http.pool.ConnPoolControl<org.apache.http.conn.routing.HttpRoute>

      public class MeasuringConnectionManager
      extends JMeterPoolingClientConnectionManager

  Adapter for `PoolingClientConnectionManager` that wraps all connection requests into time-measured implementation a private MeasuringConnectionRequest

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `MeasuringConnectionManager(org.apache.http.conn.scheme.SchemeRegistry schemeRegistry, org.apache.http.conn.DnsResolver resolver, int timeToLiveMs, int validateAfterInactivityMs)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected org.apache.http.conn.ClientConnectionOperator` | `createConnectionOperator(org.apache.http.conn.scheme.SchemeRegistry schreg)` Overriden to use `JMeterClientConnectionOperator` and fix SNI issue
    `org.apache.http.conn.ClientConnectionRequest` | `requestConnection(org.apache.http.conn.routing.HttpRoute route, Object state)`

    - ### Methods inherited from class org.apache.jmeter.protocol.http.sampler.hc.JMeterPoolingClientConnectionManager

      `closeExpiredConnections, closeIdleConnections, finalize, getDefaultMaxPerRoute, getDnsResolver, getMaxPerRoute, getMaxTotal, getSchemeRegistry, getStats, getTotalStats, getValidateAfterInactivity, releaseConnection, setDefaultMaxPerRoute, setMaxPerRoute, setMaxTotal, setValidateAfterInactivity, shutdown`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### MeasuringConnectionManager

          public MeasuringConnectionManager(org.apache.http.conn.scheme.SchemeRegistry schemeRegistry,
                                            org.apache.http.conn.DnsResolver resolver,
                                            int timeToLiveMs,
                                            int validateAfterInactivityMs)

  - ### Method Detail

    - #### requestConnection

          public org.apache.http.conn.ClientConnectionRequest requestConnection(org.apache.http.conn.routing.HttpRoute route,
                                                                                Object state)

      Specified by:
        `requestConnection` in interface `org.apache.http.conn.ClientConnectionManager`
      Overrides:
        `requestConnection` in class `JMeterPoolingClientConnectionManager`

    - #### createConnectionOperator

          protected org.apache.http.conn.ClientConnectionOperator createConnectionOperator(org.apache.http.conn.scheme.SchemeRegistry schreg)

      Overriden to use `JMeterClientConnectionOperator` and fix SNI issue
      Overrides:
        `createConnectionOperator` in class `JMeterPoolingClientConnectionManager`
      Parameters:
        `schreg` - the scheme registry.
      Returns:
        the connection operator to use
      See Also:
        "https://bz.apache.org/bugzilla/show_bug.cgi?id=57935", `PoolingClientConnectionManager.createConnectionOperator(org.apache.http.conn.scheme.SchemeRegistry)`

Copyright © 1998-2017 Apache Software Foundation. All Rights Reserved.