vert-x/vert.x — pull request #474 by jdonnerstag (2012-12-26 18:59:45+00:00)
Title: ProxyConfig and VertxConfig

I wasn't quite happy with the proxy enhancement to VerticleManager, as proxy
functionality is certainly required for more than just remote repositories.
The component which actually requires the proxy parameters is DefaultHttpClient.
But simply copying the logic from VerticleManager to DefaultHttpClient didn't feel
right, especially as proxy configs can be more complicated than just a proxy host.
Sometimes you need proxy user and password. Sometimes you want to more explicitly
register hosts as internal or external (requires proxy). This led to a first version
of ProxyConfig.
When the number of config param grew I felt to put them into a config file (json). Yet I didn't
want to loose the capabilities to config via system properties and/or env vars. At
that point I designed VertxConfig. It reads a json config file, but supports
placeholders (e.g. env vars, props, include files). That made ProxyConfig more
easy as well as all boilerplate moved into (re-usable) VertxConfig. Re-usable, because
more vertx config params (e.g. language mappings) can easily be added.
Along the way I improved the exception message for DefaultHttpClient connection errors to provide the host and port, and the proxy data.

Juergen