sonatype/nexus — pull request #567 by cstamas (2012-10-06 14:55:28+00:00)
Title: HC4Provider and replacement for HttpClientUtil.

For reference only and review.

Do not pull!

Comments warmly accepted :D Same for patches :D :D

Changes in here:

Hc4Provider purpose is twofold:
* to offer "shared" instance (Httpclient is thread safe) to ease lives in any component that needs HTTP Client to perform some task, typically like LVO, GPGSKS etc.
* to centralize and make reusable the logic for creating and _configuring_ according to Nexus config HTTP Client instances.

Shared instance, as subsystems (that will) using it does not make "bursted" requests, has NO pooling intentionally set (hence, less problems to care about too).

Proxy repositories got HttpClientManager, that keeps and manages _shared connection manager_ to be used for proxies only, and manages creation and release of HTTP clients needed for proxy repositories. Context muck is shifted to actual RemoteRepositoryStorage implementation.