com.jdroid.java.http.apache
Class DefaultHttpClientFactory
java.lang.Object
com.jdroid.java.http.apache.DefaultHttpClientFactory
- All Implemented Interfaces:
- HttpClientFactory
public class DefaultHttpClientFactory
- extends Object
- implements HttpClientFactory
|
Method Summary |
org.apache.http.impl.client.DefaultHttpClient |
createHttpClient()
Creates a DefaultHttpClient and sets a default timeout and user agent for it. |
org.apache.http.impl.client.DefaultHttpClient |
createHttpClient(Integer timeout,
String userAgent)
Creates a DefaultHttpClient and sets a timeout for it. |
static HttpClientFactory |
get()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultHttpClientFactory
public DefaultHttpClientFactory()
get
public static HttpClientFactory get()
createHttpClient
public org.apache.http.impl.client.DefaultHttpClient createHttpClient()
- Description copied from interface:
HttpClientFactory
- Creates a
DefaultHttpClient and sets a default timeout and user agent for it.
- Specified by:
createHttpClient in interface HttpClientFactory
- Returns:
DefaultHttpClient The created client.- See Also:
HttpClientFactory.createHttpClient()
createHttpClient
public org.apache.http.impl.client.DefaultHttpClient createHttpClient(Integer timeout,
String userAgent)
- Description copied from interface:
HttpClientFactory
- Creates a
DefaultHttpClient and sets a timeout for it.
- Specified by:
createHttpClient in interface HttpClientFactory
- Parameters:
timeout - The connection timeout in milliseconds. If null a default timeout of 10 seconds will be used.userAgent - The user agent
- Returns:
DefaultHttpClient The created client.- See Also:
HttpClientFactory.createHttpClient(java.lang.Integer, java.lang.String)
Copyright © 2014. All rights reserved.