org.apache.tools.ant.util

Class ProxySetup

public class ProxySetup extends Object

Code to do proxy setup. This is just factored out of the main system just to keep everything else less convoluted.

Since: Ant1.7

Field Summary
static StringFTP_NON_PROXY_HOSTS
the ftp hosts not to be proxied property
static StringFTP_PROXY_HOST
the ftp proxyhost property
static StringFTP_PROXY_PORT
the ftp proxyport property
static StringHTTPS_NON_PROXY_HOSTS
the http hosts not to be proxied property
static StringHTTPS_PROXY_HOST
the https proxyhost property
static StringHTTPS_PROXY_PORT
the https proxyport property
static StringHTTP_NON_PROXY_HOSTS
the ftp proxyport property
static StringHTTP_PROXY_HOST
the http proxyhost property
static StringHTTP_PROXY_PASSWORD
the http proxy password property
static StringHTTP_PROXY_PORT
the http proxyport property
static StringHTTP_PROXY_USERNAME
the http proxy username property
static StringSOCKS_PROXY_HOST
the socks proxy host property
static StringSOCKS_PROXY_PASSWORD
the socks proxy password property
static StringSOCKS_PROXY_PORT
the socks proxy port property
static StringSOCKS_PROXY_USERNAME
the socks proxy username property
static StringUSE_SYSTEM_PROXIES
Java1.5 property that enables use of system proxies.
Constructor Summary
ProxySetup(Project owner)
create a proxy setup class bound to this project
Method Summary
voidenableProxies()
turn proxies on; if the proxy key is already set to some value: leave alone. if an ant property of the value {@link #USE_SYSTEM_PROXIES} is set, use that instead.
static StringgetSystemProxySetting()
Get the current system property settings

Field Detail

FTP_NON_PROXY_HOSTS

public static final String FTP_NON_PROXY_HOSTS
the ftp hosts not to be proxied property

FTP_PROXY_HOST

public static final String FTP_PROXY_HOST
the ftp proxyhost property

FTP_PROXY_PORT

public static final String FTP_PROXY_PORT
the ftp proxyport property

HTTPS_NON_PROXY_HOSTS

public static final String HTTPS_NON_PROXY_HOSTS
the http hosts not to be proxied property

HTTPS_PROXY_HOST

public static final String HTTPS_PROXY_HOST
the https proxyhost property

HTTPS_PROXY_PORT

public static final String HTTPS_PROXY_PORT
the https proxyport property

HTTP_NON_PROXY_HOSTS

public static final String HTTP_NON_PROXY_HOSTS
the ftp proxyport property

HTTP_PROXY_HOST

public static final String HTTP_PROXY_HOST
the http proxyhost property

HTTP_PROXY_PASSWORD

public static final String HTTP_PROXY_PASSWORD
the http proxy password property

HTTP_PROXY_PORT

public static final String HTTP_PROXY_PORT
the http proxyport property

HTTP_PROXY_USERNAME

public static final String HTTP_PROXY_USERNAME
the http proxy username property

SOCKS_PROXY_HOST

public static final String SOCKS_PROXY_HOST
the socks proxy host property

SOCKS_PROXY_PASSWORD

public static final String SOCKS_PROXY_PASSWORD
the socks proxy password property

SOCKS_PROXY_PORT

public static final String SOCKS_PROXY_PORT
the socks proxy port property

SOCKS_PROXY_USERNAME

public static final String SOCKS_PROXY_USERNAME
the socks proxy username property

USE_SYSTEM_PROXIES

public static final String USE_SYSTEM_PROXIES
Java1.5 property that enables use of system proxies.

UNKNOWN:

Constructor Detail

ProxySetup

public ProxySetup(Project owner)
create a proxy setup class bound to this project

Parameters: owner the project that owns this setup.

Method Detail

enableProxies

public void enableProxies()
turn proxies on; if the proxy key is already set to some value: leave alone. if an ant property of the value {@link #USE_SYSTEM_PROXIES} is set, use that instead. Else set to "true".

getSystemProxySetting

public static String getSystemProxySetting()
Get the current system property settings

Returns: current value; null for none or no access