location += "/" + core;
}
// Initialize standard solr-j.
// First, we need an HttpClient where basic auth is properly set up.
PoolingClientConnectionManager localConnectionManager = new PoolingClientConnectionManager();
localConnectionManager.setMaxTotal(1);
SSLSocketFactory myFactory;
if (keystoreManager != null)
{
myFactory = new SSLSocketFactory(keystoreManager.getSecureSocketFactory(),
new AllowAllHostnameVerifier());
}
else
{
// Use the "trust everything" one
myFactory = new SSLSocketFactory(KeystoreManagerFactory.getTrustingSecureSocketFactory(),
new AllowAllHostnameVerifier());
}
Scheme myHttpsProtocol = new Scheme("https", 443, myFactory);
localConnectionManager.getSchemeRegistry().register(myHttpsProtocol);
connectionManager = localConnectionManager;
BasicHttpParams params = new BasicHttpParams();
params.setBooleanParameter(CoreConnectionPNames.TCP_NODELAY,true);
params.setBooleanParameter(CoreConnectionPNames.STALE_CONNECTION_CHECK,true);