public static int getProxyPort(AppleServer server) {
		String host = server != null ? server.getProxyHost() : null;
		if (host != null && host.length() > 0) {
			return server.getProxyPort();
		} else {
			host = System.getProperty(LOCAL_PROXY_HOST_PROPERTY);
			if (host != null && host.length() > 0) {
				return Integer.parseInt(System.getProperty(LOCAL_PROXY_PORT_PROPERTY));
			} else {
				host = System.getProperty(JVM_PROXY_HOST_PROPERTY);
				if (host != null && host.length() > 0) {
					return Integer.parseInt(System.getProperty(JVM_PROXY_PORT_PROPERTY));
				} else {
					return 0;
				}
			}
		}
	}
public static int getProxyPort ( AppleServer server ) { String host = server != null ? server . getProxyHost ( ) : null ; if ( host != null && host . length ( ) > 0 ) { return server . getProxyPort ( ) ; } else { host = System . getProperty ( LOCAL_PROXY_HOST_PROPERTY ) ; if ( host != null && host . length ( ) > 0 ) { return Integer . parseInt ( System . getProperty ( LOCAL_PROXY_PORT_PROPERTY ) ) ; } else { host = System . getProperty ( JVM_PROXY_HOST_PROPERTY ) ; if ( host != null && host . length ( ) > 0 ) { return Integer . parseInt ( System . getProperty ( JVM_PROXY_PORT_PROPERTY ) ) ; } else { return 0 ; } } } }
Get the proxy port currently configured.
This method first locates a proxy host setting, then returns the proxy port from the same location.
@param server a specific server to check for proxy settings (may be null)
@return a network port, or 0 if no proxy is configured