|
deegree-core-3.0-pre-nightly (2010/03/05 00:01) - official | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.deegree.commons.utils.ProxyUtils
public final class ProxyUtils
Utility class for accessing and modifying the VM's proxy configuration and for opening URL connections that respect proxy configurations which require authentication.
Please note that Java's proxy configuration is VM-global: there is a set of system properties (proxyHost, proxyPort,
etc.) that determines the behaviour of network-related classes (e.g. in java.net
). This makes sense, as
the proxy configuration is usually defined by the network environment of the physical machine.
Constructor Summary | |
---|---|
ProxyUtils()
|
Method Summary | |
---|---|
static String |
getFtpNonProxyHosts(boolean considerBaseConfig)
|
static String |
getFtpProxyHost(boolean considerBaseConfig)
|
static String |
getFtpProxyPassword(boolean considerBaseConfig)
|
static String |
getFtpProxyPort(boolean considerBaseConfig)
|
static String |
getFtpProxyUser(boolean considerBaseConfig)
|
static String |
getHttpNonProxyHosts(boolean considerBaseConfig)
|
static String |
getHttpProxyHost(boolean considerBaseConfig)
|
static String |
getHttpProxyPassword(boolean considerBaseConfig)
|
static String |
getHttpProxyPort(boolean considerBaseConfig)
|
static String |
getHttpProxyUser(boolean considerBaseConfig)
|
static String |
getNonProxyHosts()
|
static String |
getProxyHost()
|
static String |
getProxyPassword()
|
static String |
getProxyPort()
|
static String |
getProxyUser()
|
static void |
logProxyConfiguration(org.slf4j.Logger log)
|
static URLConnection |
openURLConnection(URL url,
String user,
String pass)
This method should be used everywhere instead of URL.openConnection() , as it copes with proxies that
require user authentication. |
static void |
setupProxyParameters(ProxyConfiguration config)
Sets/augments the VM's proxy configuration. |
static void |
setupProxyParameters(String proxyHost,
String httpProxyHost,
String ftpProxyHost,
int proxyPort,
int httpProxyPort,
int ftpProxyPort,
String proxyUser,
String httpProxyUser,
String ftpProxyUser,
String proxyPassword,
String httpProxyPassword,
String ftpProxyPassword,
String nonProxyHosts,
String httpNonProxyHosts,
String ftpNonProxyHosts,
boolean override)
Sets/augments the VM's proxy configuration. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ProxyUtils()
Method Detail |
---|
public static void setupProxyParameters(ProxyConfiguration config)
config
- public static void setupProxyParameters(String proxyHost, String httpProxyHost, String ftpProxyHost, int proxyPort, int httpProxyPort, int ftpProxyPort, String proxyUser, String httpProxyUser, String ftpProxyUser, String proxyPassword, String httpProxyPassword, String ftpProxyPassword, String nonProxyHosts, String httpNonProxyHosts, String ftpNonProxyHosts, boolean override)
proxyHost
- httpProxyHost
- ftpProxyHost
- proxyPort
- httpProxyPort
- ftpProxyPort
- proxyUser
- httpProxyUser
- ftpProxyUser
- proxyPassword
- httpProxyPassword
- ftpProxyPassword
- nonProxyHosts
- httpNonProxyHosts
- ftpNonProxyHosts
- override
- public static URLConnection openURLConnection(URL url, String user, String pass) throws IOException
URL.openConnection()
, as it copes with proxies that
require user authentication.
url
- user
- pass
-
IOException
public static String getProxyHost()
public static String getHttpProxyHost(boolean considerBaseConfig)
public static String getFtpProxyHost(boolean considerBaseConfig)
public static String getProxyPort()
public static String getHttpProxyPort(boolean considerBaseConfig)
public static String getFtpProxyPort(boolean considerBaseConfig)
public static String getProxyUser()
public static String getHttpProxyUser(boolean considerBaseConfig)
public static String getFtpProxyUser(boolean considerBaseConfig)
public static String getProxyPassword()
public static String getHttpProxyPassword(boolean considerBaseConfig)
public static String getFtpProxyPassword(boolean considerBaseConfig)
public static String getNonProxyHosts()
public static String getHttpNonProxyHosts(boolean considerBaseConfig)
public static String getFtpNonProxyHosts(boolean considerBaseConfig)
public static void logProxyConfiguration(org.slf4j.Logger log)
|
deegree-core-3.0-pre-nightly (2010/03/05 00:01) - official | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |