powered by Jive Software

Is the ConnectionConfiguration#ProxyInfo ignored by the Connection class?

Hi,

I am trying to connect through a proxy.

After reading the code, it seems, that the proxy information in my ConnectionConfiguration class is ignored:

if (config.getSocketFactory() == null) {

this.socket = new Socket(host, port);

}

else {

this.socket = config.getSocketFactory().createSocket(host, port);

}

Obviously the socket can’t connect and an UnknownHostException is thrown.

Then searching for accessors to the configuration’s proxyInfo field yields zero results.

So I suspect the value is written but never read/used!?

Any clarification on this issue is appreciated!

I don’t see the problem with the code. If a proxy is configured config.getSocketFactory will return the proxy’s socket factory.

Ah, right. When I debugged, it didn’t use the socketFactory else branch, but I guess that was a fault in my settings.

Didn’t know that the socketFactory is used for proxies, I thought a user can explicitly set one for some other purposes.

Thanks, I’ve definitively didn’t look deep enough.