public class ProxyConfiguration
extends java.lang.Object
Constructor and Description |
---|
ProxyConfiguration() |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getAutoconfigProxyAddress()
Returns a string that represents a path to the script that contains proxy configuration.
|
int |
getConnectionType()
Returns a connection type for the current proxy configuration.
|
java.lang.String |
getPassword(int serverType)
Returns a string that represents password for a specified server type.
|
java.lang.String |
getProxy(int serverType)
Returns proxy address for a specified server type.
|
java.util.Set<java.lang.String> |
getProxyExceptions()
Returns a set of strings that represent proxy exceptions.
|
java.lang.String |
getUserName(int serverType)
Returns a string that represents user name for a specified server type.
|
boolean |
isIgnoreProxyForLocalAddresses()
Returns
TRUE if local addresses are ignored by proxy server,
otherwise - FALSE . |
void |
setAutoconfigProxyAddress(java.lang.String address)
Sets a string that represents a path to the script that contains proxy configuration.
|
void |
setConnectionType(int connectionType)
Sets a specified connection connectionType for the current proxy configuration.
|
void |
setIgnoreProxyForLocalAddresses(boolean ignore)
Enables or disables ignoring proxy server for local addresses.
|
void |
setPassword(java.lang.String password,
int serverType)
Sets password for a specified server type.
|
void |
setProxy(java.lang.String proxyAddress,
int serverType)
Sets proxy address for a specified server type.
|
void |
setProxyExceptions(java.util.Collection<java.lang.String> exceptions)
Sets a set of strings that represent proxy exceptions.
|
void |
setUserName(java.lang.String userName,
int serverType)
Sets a user name for a specified server type.
|
public void setProxy(java.lang.String proxyAddress, int serverType)
proxyAddress
- a string in the following format: "address:port".
For example: 127.0.0.1:8081serverType
- specified server type.
One of the following values:
ProxyConfiguration.ServerType.HTTP
,
ProxyConfiguration.ServerType.FTP
,
ProxyConfiguration.ServerType.SECURE
,
ProxyConfiguration.ServerType.SOCKS
or
ProxyConfiguration.ServerType.GOPHER
public java.lang.String getProxy(int serverType)
serverType
- specified server type.
One of the following values:
ProxyConfiguration.ServerType.HTTP
,
ProxyConfiguration.ServerType.FTP
,
ProxyConfiguration.ServerType.SECURE
,
ProxyConfiguration.ServerType.SOCKS
or
ProxyConfiguration.ServerType.GOPHER
public void setUserName(java.lang.String userName, int serverType)
userName
- a string that represents user name.serverType
- specified server type.public java.lang.String getUserName(int serverType)
serverType
- specified server type.
One of the following values:
ProxyConfiguration.ServerType.HTTP
,
ProxyConfiguration.ServerType.FTP
,
ProxyConfiguration.ServerType.SECURE
,
ProxyConfiguration.ServerType.SOCKS
or
ProxyConfiguration.ServerType.GOPHER
public void setPassword(java.lang.String password, int serverType)
password
- a string that represents password.serverType
- specified server type.public java.lang.String getPassword(int serverType)
serverType
- specified server type.
One of the following values:
ServerType.HTTP
,
ServerType.FTP
,
ServerType.SECURE
,
ServerType.SOCKS
or
ServerType.GOPHER
public void setProxyExceptions(java.util.Collection<java.lang.String> exceptions)
exceptions
- a set of strings that represent proxy exceptions.public java.util.Set<java.lang.String> getProxyExceptions()
public void setIgnoreProxyForLocalAddresses(boolean ignore)
ignore
- TRUE
if local addresses are ignored by proxy server,
otherwise - FALSE
public boolean isIgnoreProxyForLocalAddresses()
TRUE
if local addresses are ignored by proxy server,
otherwise - FALSE
.TRUE
if local addresses are ignored by proxy server,
otherwise - FALSE
.public void setAutoconfigProxyAddress(java.lang.String address)
address
- a string that represents a path to the script that contains proxy configuration.public java.lang.String getAutoconfigProxyAddress()
public void setConnectionType(int connectionType)
connectionType
- a specified connection connectionType for the current proxy configuration.public int getConnectionType()