// Set up the pool.
// We have a choice: We can either have one httpclient instance, which gets reinitialized for every service
// it connects with (because each one has a potentially different proxy setup), OR we can have a different
// httpclient for each service. The latter approach is obviously the more efficient, so I've chosen to do it
// that way.
PoolingClientConnectionManager localConnectionManager = new PoolingClientConnectionManager();
localConnectionManager.setMaxTotal(1);
if (mySSLFactory != null)
{
SSLSocketFactory myFactory = new SSLSocketFactory(mySSLFactory, new BrowserCompatHostnameVerifier());
Scheme myHttpsProtocol = new Scheme("https", 443, myFactory);
localConnectionManager.getSchemeRegistry().register(myHttpsProtocol);
}
connectionManager = localConnectionManager;
// Parse the user and password values
int index = userName.indexOf("\\");