Class 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 HttpClientMetricNameStrategy metricNameStrategy  
      private java.lang.String name  
      private MetricRegistry registry  
      • 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, java.lang.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

      All Methods Instance Methods Concrete Methods 
      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
    • Constructor Detail

      • InstrumentedRequestDirector

        public InstrumentedRequestDirector​(MetricRegistry registry,
                                           java.lang.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 Detail

      • 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,
                                                    java.io.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
        java.io.IOException
      • timer

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