Package com.codahale.metrics.httpclient
Class InstrumentedHttpClient
java.lang.Object
org.apache.http.impl.client.CloseableHttpClient
org.apache.http.impl.client.AbstractHttpClient
org.apache.http.impl.client.DefaultHttpClient
com.codahale.metrics.httpclient.InstrumentedHttpClient
- All Implemented Interfaces:
Closeable
,AutoCloseable
,org.apache.http.client.HttpClient
public class InstrumentedHttpClient
extends org.apache.http.impl.client.DefaultHttpClient
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final org.apache.commons.logging.Log
private final HttpClientMetricNameStrategy
private final String
private final MetricRegistry
-
Constructor Summary
ConstructorsConstructorDescriptionInstrumentedHttpClient
(MetricRegistry registry) InstrumentedHttpClient
(MetricRegistry registry, HttpClientMetricNameStrategy metricNameStrategy) InstrumentedHttpClient
(MetricRegistry registry, InstrumentedClientConnManager manager, org.apache.http.params.HttpParams params, String name) InstrumentedHttpClient
(MetricRegistry registry, String name, HttpClientMetricNameStrategy metricNameStrategy) InstrumentedHttpClient
(MetricRegistry registry, org.apache.http.conn.ClientConnectionManager manager, org.apache.http.params.HttpParams params, String name, HttpClientMetricNameStrategy metricNameStrategy) InstrumentedHttpClient
(MetricRegistry registry, org.apache.http.params.HttpParams params) -
Method Summary
Modifier and TypeMethodDescriptionprotected org.apache.http.client.RequestDirector
createClientRequestDirector
(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) Methods inherited from class org.apache.http.impl.client.DefaultHttpClient
createHttpParams, createHttpProcessor, setDefaultHttpParams
Methods inherited from class org.apache.http.impl.client.AbstractHttpClient
addRequestInterceptor, addRequestInterceptor, addResponseInterceptor, addResponseInterceptor, clearRequestInterceptors, clearResponseInterceptors, close, createAuthSchemeRegistry, createClientConnectionManager, createClientRequestDirector, createClientRequestDirector, createConnectionKeepAliveStrategy, createConnectionReuseStrategy, createCookieSpecRegistry, createCookieStore, createCredentialsProvider, createHttpContext, createHttpRequestRetryHandler, createHttpRoutePlanner, createProxyAuthenticationHandler, createProxyAuthenticationStrategy, createRedirectHandler, createRequestExecutor, createTargetAuthenticationHandler, createTargetAuthenticationStrategy, createUserTokenHandler, determineParams, doExecute, getAuthSchemes, getBackoffManager, getConnectionBackoffStrategy, getConnectionKeepAliveStrategy, getConnectionManager, getConnectionReuseStrategy, getCookieSpecs, getCookieStore, getCredentialsProvider, getHttpProcessor, getHttpRequestRetryHandler, getParams, getProxyAuthenticationHandler, getProxyAuthenticationStrategy, getRedirectHandler, getRedirectStrategy, getRequestExecutor, getRequestInterceptor, getRequestInterceptorCount, getResponseInterceptor, getResponseInterceptorCount, getRoutePlanner, getTargetAuthenticationHandler, getTargetAuthenticationStrategy, getUserTokenHandler, removeRequestInterceptorByClass, removeResponseInterceptorByClass, setAuthSchemes, setBackoffManager, setConnectionBackoffStrategy, setCookieSpecs, setCookieStore, setCredentialsProvider, setHttpRequestRetryHandler, setKeepAliveStrategy, setParams, setProxyAuthenticationHandler, setProxyAuthenticationStrategy, setRedirectHandler, setRedirectStrategy, setReuseStrategy, setRoutePlanner, setTargetAuthenticationHandler, setTargetAuthenticationStrategy, setUserTokenHandler
Methods inherited from class org.apache.http.impl.client.CloseableHttpClient
execute, execute, execute, execute, execute, execute, execute, execute
-
Field Details
-
log
private final org.apache.commons.logging.Log log -
registry
-
name
-
metricNameStrategy
-
-
Constructor Details
-
InstrumentedHttpClient
public InstrumentedHttpClient(MetricRegistry registry, org.apache.http.conn.ClientConnectionManager manager, org.apache.http.params.HttpParams params, String name, HttpClientMetricNameStrategy metricNameStrategy) -
InstrumentedHttpClient
public InstrumentedHttpClient(MetricRegistry registry, InstrumentedClientConnManager manager, org.apache.http.params.HttpParams params, String name) -
InstrumentedHttpClient
-
InstrumentedHttpClient
-
InstrumentedHttpClient
public InstrumentedHttpClient(MetricRegistry registry, HttpClientMetricNameStrategy metricNameStrategy) -
InstrumentedHttpClient
public InstrumentedHttpClient(MetricRegistry registry, String name, HttpClientMetricNameStrategy metricNameStrategy)
-
-
Method Details
-
createClientRequestDirector
protected org.apache.http.client.RequestDirector createClientRequestDirector(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) - Overrides:
createClientRequestDirector
in classorg.apache.http.impl.client.AbstractHttpClient
-