public class StreamClientConfigurationImpl extends AbstractStreamClientConfiguration
Modifier and Type | Field and Description |
---|---|
protected String |
contentCharset |
protected int |
maxTotalConnections |
protected int |
maxTotalPerRoute |
logWarningSeconds, requestExecutorService, timeoutSeconds
Constructor and Description |
---|
StreamClientConfigurationImpl(ExecutorService timeoutExecutorService) |
StreamClientConfigurationImpl(ExecutorService timeoutExecutorService,
int timeoutSeconds) |
Modifier and Type | Method and Description |
---|---|
String |
getContentCharset() |
int |
getMaxTotalConnections()
Defaults to 1024.
|
int |
getMaxTotalPerRoute()
Defaults to 100.
|
int |
getRequestRetryCount() |
int |
getSocketBufferSize()
Returning
-1 will also avoid OOM on the HTC Thunderbolt where default size is 2MB (!):
http://stackoverflow.com/questions/5358014/android-httpclient-oom-on-4g-lte-htc-thunderbolt |
boolean |
getStaleCheckingEnabled() |
void |
setContentCharset(String contentCharset) |
void |
setMaxTotalConnections(int maxTotalConnections) |
void |
setMaxTotalPerRoute(int maxTotalPerRoute) |
getLogWarningSeconds, getRequestExecutorService, getTimeoutSeconds, getUserAgentValue, setLogWarningSeconds, setRequestExecutorService, setTimeoutSeconds
protected int maxTotalConnections
protected int maxTotalPerRoute
protected String contentCharset
public StreamClientConfigurationImpl(ExecutorService timeoutExecutorService)
public StreamClientConfigurationImpl(ExecutorService timeoutExecutorService, int timeoutSeconds)
public int getMaxTotalConnections()
public void setMaxTotalConnections(int maxTotalConnections)
public int getMaxTotalPerRoute()
public void setMaxTotalPerRoute(int maxTotalPerRoute)
public String getContentCharset()
public void setContentCharset(String contentCharset)
public int getSocketBufferSize()
Returning -1
will also avoid OOM on the HTC Thunderbolt where default size is 2MB (!):
http://stackoverflow.com/questions/5358014/android-httpclient-oom-on-4g-lte-htc-thunderbolt
-1
, enabling HttpClient's default (8192 bytes in version 4.1)public boolean getStaleCheckingEnabled()
false
.public int getRequestRetryCount()
0
, use -1
to enable HttpClient's default (3 retries in version 4.1)Copyright © 2014 4th Line GmbH, Switzerland. All Rights Reserved.