Using ProxySelector to allow users to configure the proxy
Paulo Levi
i30817 at gmail.com
Mon May 4 05:59:00 PDT 2009
But it's completely unintuitive! I can't know if i need to bother the user
about proxy configuration before trying with no proxy, but trying to use
that disallows the use of any other.
Trying to wrap Proxy.NO_PROXY to circumvent that, even if technically
possible, just makes the code fail in the next line.
if (p.type() != Proxy.Type.SOCKS)
throw new SocketException("Unknown proxy type : " + p.type());
I'm doing this because it's the natural way to create the behavior i want,
only bugging the user for the proxy if needed.
If you have another idea that doesn't involve bogus requests to
google.comor other "know assumed forever" sites i'd like to hear it.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/net-dev/attachments/20090504/c06514f7/attachment.html
More information about the net-dev
mailing list