String host = System.getProperty(PROXY_HOST);
if ( host != null ) {
int port = Integer.valueOf(System.getProperty(PROXY_PORT, "80"));
Protocol protocol;
try {
protocol = Protocol.valueOf(System.getProperty(PROXY_PROTOCOL, "HTTP"));
} catch(IllegalArgumentException e) {
protocol = Protocol.HTTP;
}