How to programmatically in Java check whether a proxy server is alive or works and can be used? I mean I can use this proxy in order to access external services via this proxy.
For instance, setting up an Authenticated Proxy with code like this:
httpclient.getCredentialsProvider().setCredentials(
new AuthScope(proxyHostNameOrIp, 8282),
new UsernamePasswordCredentials(username, password));
what if 'username' and 'password' were entered by the user (and entered incorrectly)? Is there any mechanism to 'validate' that the proxy information is valid assuming it has all been entered by a user?