Hi again Ethan,
I'm making some good progress here, but
always more trouble...
We generally use proxy auto-config with a
long script written by someone in Basel. There are a bunch of
different proxies, but only one is relevant for this story. The problem is
that a proxy is required for any link-outs from cytoscape, but the proxy will
not respond to internal requests. As you know cytoscape allows one to
specify a proxy, but then it is used for every request. So I get to choose
between internal and external connectivity...
Java now provides a class called
ProxySelector, and there is a default system ProxySelector. You pass it a
uri and it returns appropriate proxy information.
If you are running an applet or doing a
web start, the proxyselector can be configured on the java control panel to use
the browser defaults, which means: obey the pac script. However, a
free-standing application evidently does not do this, and the default selector
always returns "no proxy". The configuration script is in javascript, not
java, and there doesn't seem to be an easy way to load it up into a java
application (although some hard ways are proposed on various web pages.)
In either case, you can write your own implementation of the ProxySelector class
and register it as the default.
So anyway, I will have to code up my own
proxy handler for my internal version of cpath, and it looks like ProxySelector
is the way I will go. Is there any interest in
replacing the current proxy mechanism in cytoscape with ProxySelector and, if
so, does it make sense for me to attack the problem more generally rather than
just writing what I need to get things going here at
Syngenta?
Rex