public final class ProxyManager
extends java.lang.Object
| Constructor and Description |
|---|
ProxyManager() |
| Modifier and Type | Method and Description |
|---|---|
static void |
setHttpProxy(java.lang.String hostname,
int port)
Set HTTP Proxy.
|
static void |
setHttpProxyAuthentication(boolean needs_auth,
java.lang.String username,
java.lang.String password)
Set authentication data for authenticating the client with HTTP Proxy.
|
static void |
setHttpsProxy(java.lang.String hostname,
int port)
Set HTTPS Proxy.
|
static void |
setHttpsProxyAuthentication(boolean needs_auth,
java.lang.String username,
java.lang.String password)
Set authentication data for authenticating the client with HTTPS Proxy.
|
public static void setHttpProxy(java.lang.String hostname,
int port)
throws ErrorCodeException
hostname - proxy host pass hostname for the Proxy Server to set Proxy
and null or empty string to unset Proxyport - proxy port pass port for the Proxy Server to set Proxy
and 0 to unset ProxyErrorCodeExceptionpublic static void setHttpsProxy(java.lang.String hostname,
int port)
throws ErrorCodeException
hostname - proxy host pass hostname for the Proxy Server to set Proxy
and null or empty string to unset Proxyport - proxy port pass port for the Proxy Server to set Proxy
and 0 to unset ProxyErrorCodeExceptionpublic static void setHttpProxyAuthentication(boolean needs_auth,
java.lang.String username,
java.lang.String password)
throws ErrorCodeException
needs_auth - sets the flag to indicate if the HTTP proxy needs authentication or not
pass true to set Proxy Authentication, false to unset Proxy Authenticationusername - username for authentication to the HTTP proxy using Basic auth
pass null or empty string to unset Proxy Authenticationpassword - password for authentication to the HTTP proxy using Basic auth
pass null or empty string to unset Proxy Authentication
When needs_auth is set to false, the proxy authentication is turned off. In this case
null values may be passed for username and password parametersErrorCodeExceptionpublic static void setHttpsProxyAuthentication(boolean needs_auth,
java.lang.String username,
java.lang.String password)
throws ErrorCodeException
needs_auth - sets the flag to indicate if the HTTPS proxy needs authentication or not
pass true to set Proxy Authentication, false to unset Proxy Authenticationusername - username for authentication to the HTTPS proxy using Basic auth
pass null or empty string to unset Proxy Authenticationpassword - password for authentication to the HTTPS proxy using Basic auth
pass null or empty string to unset Proxy Authentication
When needs_auth is set to false, the proxy authentication is turned off. In this case
null values may be passed for username and password parametersErrorCodeException