final int port = env.getProperty(getPortPropertyName(), Integer.class);
final String host = env.getProperty(getHostPropertyName());
requestFactory = new PreemptiveAuthHttpRequestFactory(host, port, HttpHost.DEFAULT_SCHEME_NAME);
requestFactory.setReadTimeout(timeout);
} else {
requestFactory = new DigestHttpComponentsClientHttpRequestFactory() {
{
setReadTimeout(timeout);
}
};
}