Class InstrumentedRequestDirector

java.lang.Object
org.apache.http.impl.client.DefaultRequestDirector
com.codahale.metrics.httpclient.InstrumentedRequestDirector
All Implemented Interfaces:
org.apache.http.client.RequestDirector

public class InstrumentedRequestDirector extends org.apache.http.impl.client.DefaultRequestDirector
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
     
    private final String
     
    private final MetricRegistry
     

    Fields inherited from class org.apache.http.impl.client.DefaultRequestDirector

    connManager, httpProcessor, keepAliveStrategy, managedConn, params, proxyAuthHandler, proxyAuthState, proxyAuthStrategy, redirectHandler, redirectStrategy, requestExec, retryHandler, reuseStrategy, routePlanner, targetAuthHandler, targetAuthState, targetAuthStrategy, userTokenHandler
  • Constructor Summary

    Constructors
    Constructor
    Description
    InstrumentedRequestDirector(MetricRegistry registry, String name, HttpClientMetricNameStrategy metricNameStrategy, org.apache.commons.logging.Log log, org.apache.http.protocol.HttpRequestExecutor requestExec, org.apache.http.conn.ClientConnectionManager conman, org.apache.http.ConnectionReuseStrategy reustrat, org.apache.http.conn.ConnectionKeepAliveStrategy kastrat, org.apache.http.conn.routing.HttpRoutePlanner rouplan, org.apache.http.protocol.HttpProcessor httpProcessor, org.apache.http.client.HttpRequestRetryHandler retryHandler, org.apache.http.client.RedirectStrategy redirectStrategy, org.apache.http.client.AuthenticationStrategy targetAuthStrategy, org.apache.http.client.AuthenticationStrategy proxyAuthStrategy, org.apache.http.client.UserTokenHandler userTokenHandler, org.apache.http.params.HttpParams params)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.apache.http.HttpResponse
    execute(org.apache.http.HttpHost target, org.apache.http.HttpRequest request, org.apache.http.protocol.HttpContext context)
     
    private Timer
    timer(org.apache.http.HttpRequest request)
     

    Methods inherited from class org.apache.http.impl.client.DefaultRequestDirector

    createConnectRequest, createTunnelToProxy, createTunnelToTarget, determineRoute, establishRoute, handleResponse, releaseConnection, rewriteRequestURI

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

    • InstrumentedRequestDirector

      public InstrumentedRequestDirector(MetricRegistry registry, String name, HttpClientMetricNameStrategy metricNameStrategy, org.apache.commons.logging.Log log, org.apache.http.protocol.HttpRequestExecutor requestExec, org.apache.http.conn.ClientConnectionManager conman, org.apache.http.ConnectionReuseStrategy reustrat, org.apache.http.conn.ConnectionKeepAliveStrategy kastrat, org.apache.http.conn.routing.HttpRoutePlanner rouplan, org.apache.http.protocol.HttpProcessor httpProcessor, org.apache.http.client.HttpRequestRetryHandler retryHandler, org.apache.http.client.RedirectStrategy redirectStrategy, org.apache.http.client.AuthenticationStrategy targetAuthStrategy, org.apache.http.client.AuthenticationStrategy proxyAuthStrategy, org.apache.http.client.UserTokenHandler userTokenHandler, org.apache.http.params.HttpParams params)
  • Method Details

    • execute

      public org.apache.http.HttpResponse execute(org.apache.http.HttpHost target, org.apache.http.HttpRequest request, org.apache.http.protocol.HttpContext context) throws org.apache.http.HttpException, IOException
      Specified by:
      execute in interface org.apache.http.client.RequestDirector
      Overrides:
      execute in class org.apache.http.impl.client.DefaultRequestDirector
      Throws:
      org.apache.http.HttpException
      IOException
    • timer

      private Timer timer(org.apache.http.HttpRequest request)