org.fourthline.cling.transport.impl.apache
Class StreamClientConfigurationImpl
java.lang.Object
org.fourthline.cling.transport.spi.AbstractStreamClientConfiguration
org.fourthline.cling.transport.impl.apache.StreamClientConfigurationImpl
- All Implemented Interfaces:
- StreamClientConfiguration
public class StreamClientConfigurationImpl
- extends AbstractStreamClientConfiguration
Settings for the Apache HTTP Components implementation.
- Author:
- Christian Bauer
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
maxTotalConnections
protected int maxTotalConnections
maxTotalPerRoute
protected int maxTotalPerRoute
contentCharset
protected String contentCharset
StreamClientConfigurationImpl
public StreamClientConfigurationImpl(ExecutorService timeoutExecutorService)
StreamClientConfigurationImpl
public StreamClientConfigurationImpl(ExecutorService timeoutExecutorService,
int timeoutSeconds)
getMaxTotalConnections
public int getMaxTotalConnections()
- Defaults to 1024.
setMaxTotalConnections
public void setMaxTotalConnections(int maxTotalConnections)
getMaxTotalPerRoute
public int getMaxTotalPerRoute()
- Defaults to 100.
setMaxTotalPerRoute
public void setMaxTotalPerRoute(int maxTotalPerRoute)
getContentCharset
public String getContentCharset()
- Returns:
- Character set of textual content, defaults to "UTF-8".
setContentCharset
public void setContentCharset(String contentCharset)
getSocketBufferSize
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
- Returns:
- By default
-1
, enabling HttpClient's default (8192 bytes in version 4.1)
getStaleCheckingEnabled
public boolean getStaleCheckingEnabled()
- Returns:
- Whether we should (expensively) check for stale connections, defaults to
false
.
getRequestRetryCount
public int getRequestRetryCount()
- Returns:
- By default
0
, use -1
to enable HttpClient's default (3 retries in version 4.1)
Copyright © 2013 4th Line GmbH, Switzerland. All Rights Reserved.