/** * Sets the default Properties File and Heading, and creates the HttpClient and connection * manager. * <p> * @param remoteHttpCacheAttributes */ public AbstractHttpClient( RemoteHttpCacheAttributes remoteHttpCacheAttributes ) { this.remoteHttpCacheAttributes = remoteHttpCacheAttributes; this.connectionManager = new MultiThreadedHttpConnectionManager(); this.httpClient = new HttpClient(this.connectionManager); configureClient(); }
/** * Sets the default Properties File and Heading, and creates the HttpClient and connection * manager. * <p> * @param remoteHttpCacheAttributes */ public AbstractHttpClient( RemoteHttpCacheAttributes remoteHttpCacheAttributes ) { setRemoteHttpCacheAttributes( remoteHttpCacheAttributes ); setConnectionManager( new MultiThreadedHttpConnectionManager() ); // THIS IS NOT THREAD SAFE: // setHttpClient( new HttpClient() ); // THIS IS: setHttpClient( new HttpClient( getConnectionManager() ) ); configureClient(); }