Code example for SingleClientConnManager

		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);
Connect your IDE to all the code out there  Get Codota for Java