Code example for SingleClientConnManager

0
		MyHttpClient hc = clients.poll();
		if (hc == null) {
			HttpParams params = getDefaultHttpParams();
			SchemeRegistry schreg = getDefaultSchemeRegistry();
			hc = new MyDefaultHttpClient(new SingleClientConnManager(params,
					schreg), params);
		} 
		return hc;
	} 
 
	public static interface MyHttpClient extends HttpClient {
		void recycle(); 
	} 
 
	protected static HttpParams getDefaultHttpParams() {
		BasicHttpParams params = new BasicHttpParams();
 
		HttpProtocolParams.setVersion(params, HttpVersion.HTTP_1_1);
		HttpProtocolParams.setUserAgent(params, USER_AGENT);
		HttpConnectionParams.setConnectionTimeout(params,
			NETWORK_CONNECTION_TIMEOUT);