List of usage examples for org.apache.commons.httpclient HttpConnection getProxyPort
public int getProxyPort()
From source file:com.exalead.io.failover.MonitoredHttpConnectionManager.java
/** * Gets the host configuration for a connection. * @param conn the connection to get the configuration of * @return a new HostConfiguration/*from w ww .jav a 2 s.c o m*/ */ static HostConfiguration rebuildConfigurationFromConnection(HttpConnection conn) { HostConfiguration connectionConfiguration = new HostConfiguration(); connectionConfiguration.setHost(conn.getHost(), conn.getPort(), conn.getProtocol()); if (conn.getLocalAddress() != null) { connectionConfiguration.setLocalAddress(conn.getLocalAddress()); } if (conn.getProxyHost() != null) { connectionConfiguration.setProxy(conn.getProxyHost(), conn.getProxyPort()); } return connectionConfiguration; }