public class NFHttpClient
extends org.apache.http.impl.client.DefaultHttpClient
| Modifier and Type | Field and Description |
|---|---|
protected static java.lang.String |
EXECUTE_TRACER |
| Modifier | Constructor and Description |
|---|---|
protected |
NFHttpClient() |
protected |
NFHttpClient(java.lang.String name) |
protected |
NFHttpClient(java.lang.String name,
com.netflix.client.config.IClientConfig config) |
protected |
NFHttpClient(java.lang.String name,
com.netflix.client.config.IClientConfig config,
boolean registerMonitor) |
protected |
NFHttpClient(java.lang.String host,
int port) |
| Modifier and Type | Method and Description |
|---|---|
<T> T |
execute(org.apache.http.HttpHost target,
org.apache.http.HttpRequest request,
org.apache.http.client.ResponseHandler<? extends T> responseHandler) |
<T> T |
execute(org.apache.http.HttpHost target,
org.apache.http.HttpRequest request,
org.apache.http.client.ResponseHandler<? extends T> responseHandler,
org.apache.http.protocol.HttpContext context) |
<T> T |
execute(org.apache.http.client.methods.HttpUriRequest request,
org.apache.http.client.ResponseHandler<? extends T> responseHandler) |
<T> T |
execute(org.apache.http.client.methods.HttpUriRequest request,
org.apache.http.client.ResponseHandler<? extends T> responseHandler,
org.apache.http.protocol.HttpContext context) |
int |
getConnectionsInPool() |
com.netflix.config.DynamicIntProperty |
getConnIdleEvictTimeMilliSeconds() |
ConnectionPoolCleaner |
getConnPoolCleaner() |
int |
getMaxConnectionsPerHost() |
int |
getMaxTotalConnnections() |
int |
getNumRetries() |
int |
getSleepTimeFactorMs() |
void |
initConnectionCleanerTask() |
void |
setConnIdleEvictTimeMilliSeconds(com.netflix.config.DynamicIntProperty connIdleEvictTimeMilliSeconds) |
void |
shutdown() |
createHttpParams, createHttpProcessor, setDefaultHttpParamsaddRequestInterceptor, addRequestInterceptor, addResponseInterceptor, addResponseInterceptor, clearRequestInterceptors, clearResponseInterceptors, createAuthSchemeRegistry, createClientConnectionManager, createClientRequestDirector, createClientRequestDirector, createClientRequestDirector, createConnectionKeepAliveStrategy, createConnectionReuseStrategy, createCookieSpecRegistry, createCookieStore, createCredentialsProvider, createHttpContext, createHttpRequestRetryHandler, createHttpRoutePlanner, createProxyAuthenticationHandler, createProxyAuthenticationStrategy, createRedirectHandler, createRequestExecutor, createTargetAuthenticationHandler, createTargetAuthenticationStrategy, createUserTokenHandler, determineParams, execute, execute, execute, execute, 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, setUserTokenHandlerprotected static final java.lang.String EXECUTE_TRACER
protected NFHttpClient(java.lang.String host,
int port)
protected NFHttpClient()
protected NFHttpClient(java.lang.String name)
protected NFHttpClient(java.lang.String name,
com.netflix.client.config.IClientConfig config)
protected NFHttpClient(java.lang.String name,
com.netflix.client.config.IClientConfig config,
boolean registerMonitor)
public void initConnectionCleanerTask()
@Monitor(name="HttpClient-ConnPoolCleaner",
type=INFORMATIONAL)
public ConnectionPoolCleaner getConnPoolCleaner()
@Monitor(name="HttpClient-ConnIdleEvictTimeMilliSeconds",
type=INFORMATIONAL)
public com.netflix.config.DynamicIntProperty getConnIdleEvictTimeMilliSeconds()
@Monitor(name="HttpClient-ConnectionsInPool",
type=GAUGE)
public int getConnectionsInPool()
@Monitor(name="HttpClient-MaxTotalConnections",
type=INFORMATIONAL)
public int getMaxTotalConnnections()
@Monitor(name="HttpClient-MaxConnectionsPerHost",
type=INFORMATIONAL)
public int getMaxConnectionsPerHost()
@Monitor(name="HttpClient-NumRetries",
type=INFORMATIONAL)
public int getNumRetries()
public void setConnIdleEvictTimeMilliSeconds(com.netflix.config.DynamicIntProperty connIdleEvictTimeMilliSeconds)
@Monitor(name="HttpClient-SleepTimeFactorMs",
type=INFORMATIONAL)
public int getSleepTimeFactorMs()
public <T> T execute(org.apache.http.client.methods.HttpUriRequest request,
org.apache.http.client.ResponseHandler<? extends T> responseHandler)
throws java.io.IOException,
org.apache.http.client.ClientProtocolException
execute in interface org.apache.http.client.HttpClientexecute in class org.apache.http.impl.client.AbstractHttpClientjava.io.IOExceptionorg.apache.http.client.ClientProtocolExceptionpublic <T> T execute(org.apache.http.client.methods.HttpUriRequest request,
org.apache.http.client.ResponseHandler<? extends T> responseHandler,
org.apache.http.protocol.HttpContext context)
throws java.io.IOException,
org.apache.http.client.ClientProtocolException
execute in interface org.apache.http.client.HttpClientexecute in class org.apache.http.impl.client.AbstractHttpClientjava.io.IOExceptionorg.apache.http.client.ClientProtocolExceptionpublic <T> T execute(org.apache.http.HttpHost target,
org.apache.http.HttpRequest request,
org.apache.http.client.ResponseHandler<? extends T> responseHandler)
throws java.io.IOException,
org.apache.http.client.ClientProtocolException
execute in interface org.apache.http.client.HttpClientexecute in class org.apache.http.impl.client.AbstractHttpClientjava.io.IOExceptionorg.apache.http.client.ClientProtocolExceptionpublic <T> T execute(org.apache.http.HttpHost target,
org.apache.http.HttpRequest request,
org.apache.http.client.ResponseHandler<? extends T> responseHandler,
org.apache.http.protocol.HttpContext context)
throws java.io.IOException,
org.apache.http.client.ClientProtocolException
execute in interface org.apache.http.client.HttpClientexecute in class org.apache.http.impl.client.AbstractHttpClientjava.io.IOExceptionorg.apache.http.client.ClientProtocolExceptionpublic void shutdown()