Code example for ConnPerRouteBean

0
		schemeRegistry.register(new Scheme("https", new EasySSLSocketFactory(),
				443)); 
 
		this.httpParams = new BasicHttpParams();
		this.httpParams.setParameter(ConnManagerPNames.MAX_TOTAL_CONNECTIONS, 1);
		this.httpParams.setParameter(ConnManagerPNames.MAX_CONNECTIONS_PER_ROUTE,
				new ConnPerRouteBean(1));
		this.httpParams.setParameter(HttpProtocolParams.USE_EXPECT_CONTINUE, false);
		HttpProtocolParams.setVersion(httpParams, HttpVersion.HTTP_1_1);
		HttpProtocolParams.setContentCharset(httpParams, "utf8");
 
		/*CredentialsProvider credentialsProvider = new BasicCredentialsProvider(); 
		// TODO: make credentials configurable 
		credentialsProvider.setCredentials(AuthScope.ANY, 
				new UsernamePasswordCredentials("Admin", "admin"));*/ 
		this.clientConnectionManager = new ThreadSafeClientConnManager(httpParams,
				schemeRegistry);
 
		this.httpContext = new BasicHttpContext();
		/*this.context.setAttribute("http.auth.credentials-provider",