public class HttpClientStore extends Object
setHttpClientTypeCurrentDefault(HttpClientType) to change the default one
(default one is the embedded fast)| Modifier and Type | Method and Description |
|---|---|
com.ning.http.client.AsyncHttpClient |
getClientByType(HttpClientType type)
Gets the client by type.
|
com.ning.http.client.AsyncHttpClient |
getCurrentDefaultClient()
Gets the current default client.
|
com.ning.http.client.AsyncHttpClient |
getCustomClientFast()
Gets the custom client fast.
|
com.ning.http.client.AsyncHttpClient |
getCustomClientSlow()
Gets the custom client slow.
|
com.ning.http.client.AsyncHttpClient |
getEmbedClientFast()
default fast is the default.
|
com.ning.http.client.AsyncHttpClient |
getEmbedClientSlow()
Gets the embed client slow.
|
AsyncHttpClientFactoryEmbed |
getHttpClientFactoryEmbed()
Gets the http client factory embed.
|
HttpClientType |
getHttpClientTypeCurrentDefault()
Gets the http client type current default.
|
static HttpClientStore |
getInstance() |
Map<HttpClientType,com.ning.http.client.AsyncHttpClient> |
getMap()
Gets the map.
|
void |
init()
Initialize
|
void |
reinit()
close and clean up the http client, then create the new ones.
|
void |
setCustomClientFast(com.ning.http.client.AsyncHttpClient client)
Sets the custom client fast.
|
void |
setCustomClientSlow(com.ning.http.client.AsyncHttpClient client)
Sets the custom client slow.
|
void |
setHttpClientFactoryEmbed(AsyncHttpClientFactoryEmbed httpClientFactoryEmbed)
Sets the http client factory embed.
|
void |
setHttpClientTypeCurrentDefault(HttpClientType httpClientTypeCurrentDefault)
this is a key function, and all new command builder will use this one .
|
void |
shutdown()
Shutdown each AHC client in the map.
|
public static HttpClientStore getInstance()
public void init()
public void reinit()
public void shutdown()
public com.ning.http.client.AsyncHttpClient getEmbedClientFast()
public com.ning.http.client.AsyncHttpClient getEmbedClientSlow()
public com.ning.http.client.AsyncHttpClient getCustomClientFast()
public com.ning.http.client.AsyncHttpClient getCustomClientSlow()
public com.ning.http.client.AsyncHttpClient getClientByType(HttpClientType type)
type - the typepublic com.ning.http.client.AsyncHttpClient getCurrentDefaultClient()
public void setCustomClientFast(com.ning.http.client.AsyncHttpClient client)
client - the new custom client fastpublic void setCustomClientSlow(com.ning.http.client.AsyncHttpClient client)
client - the new custom client slowpublic HttpClientType getHttpClientTypeCurrentDefault()
public void setHttpClientTypeCurrentDefault(HttpClientType httpClientTypeCurrentDefault)
httpClientTypeCurrentDefault - the new http client type current defaultpublic Map<HttpClientType,com.ning.http.client.AsyncHttpClient> getMap()
public AsyncHttpClientFactoryEmbed getHttpClientFactoryEmbed()
public void setHttpClientFactoryEmbed(AsyncHttpClientFactoryEmbed httpClientFactoryEmbed)
httpClientFactoryEmbed - the new http client factory embedCopyright © 2015–2016 eBay. All rights reserved.