public class ProxySettings extends Object implements Configuration
Modifier and Type | Field and Description |
---|---|
static String |
PROXY_SETTINGS_FILENAME |
DEFAULT_RESOURCES_LOCATION, DIR, RESOURCES_LOCATION
Constructor and Description |
---|
ProxySettings(File applicationDataDir) |
Modifier and Type | Method and Description |
---|---|
void |
destroy()
Clean up configuration resources.
|
String |
getFtpProxyHost() |
String |
getFtpProxyPort() |
String |
getHttpProxyHost() |
String |
getHttpProxyPort()
Get HTTP proxy port as string
|
String |
getHttpsProxyHost()
Get HTTPS proxy host
|
String |
getHttpsProxyPort() |
String |
getNonProxyHostsStarting()
Get the semicolon-separated list of hostnames starting with given strings, that do not use the proxy settings.
|
boolean |
getProxiesEnabled() |
String |
getSocksProxyHost() |
String |
getSocksProxyPort() |
void |
init()
Initialize the configuration settings.
|
void |
load()
(Re-)loads the proxy system properties.
|
void |
save()
Saves the currently known settings.
|
void |
setFtpProxyHost(String ftpProxyHost) |
void |
setFtpProxyPort(String ftpProxyPort) |
void |
setHttpProxyHost(String httpProxyHost) |
void |
setHttpProxyPort(String httpProxyPort)
Set HTTP proxy port
|
void |
setHttpsProxyHost(String httpsProxyHost)
Get HTTPS proxy host
|
void |
setHttpsProxyPort(String httpsProxyPort) |
void |
setNonProxyHostsStarting(String nonProxyHostsStarting)
Set the semicolon separated list of hostnames starting with given strings, that do not use the proxy settings.
|
void |
setProperty(String key,
String val) |
void |
setProxiesEnabled(boolean proxiesEnabled) |
void |
setSocksProxyHost(String socksProxyHost) |
void |
setSocksProxyPort(String socksProxyPort) |
public static final String PROXY_SETTINGS_FILENAME
public ProxySettings(File applicationDataDir) throws IOException
IOException
public boolean getProxiesEnabled()
public void setProxiesEnabled(boolean proxiesEnabled)
proxiesEnabled
- public String getHttpProxyHost()
public void setHttpProxyHost(String httpProxyHost)
httpProxyHost
- public String getHttpProxyPort()
public void setHttpProxyPort(String httpProxyPort)
httpProxyPort
- proxy portpublic String getHttpsProxyHost()
public void setHttpsProxyHost(String httpsProxyHost)
httpsProxyHost
- public String getHttpsProxyPort()
public void setHttpsProxyPort(String httpsProxyPort)
public String getFtpProxyHost()
public void setFtpProxyHost(String ftpProxyHost)
public String getFtpProxyPort()
public void setFtpProxyPort(String ftpProxyPort)
public String getSocksProxyHost()
public void setSocksProxyHost(String socksProxyHost)
public String getSocksProxyPort()
public void setSocksProxyPort(String socksProxyPort)
public String getNonProxyHostsStarting()
public void setNonProxyHostsStarting(String nonProxyHostsStarting)
public void load() throws IOException
load
in interface Configuration
IOException
- if the configuration settings could not be loaded due to an I/O problem.public void save() throws IOException
save
in interface Configuration
IOException
- if the configuration settings could not be saved due to an I/O problem.public void destroy() throws IOException
Configuration
destroy
in interface Configuration
IOException
- if one or more resources could not be cleaned up. Implementations should attempt to clean up
as many resources as possible before returning or throwing an exception.public void init() throws IOException
Configuration
init
in interface Configuration
IOException
- if the configuration settings could not be initialized because of an I/O problem.Copyright © 2015-2020 Eclipse Foundation. All Rights Reserved.