Package org.eclipse.rdf4j.common.app.net
Class ProxySettings
java.lang.Object
org.eclipse.rdf4j.common.app.net.ProxySettings
- All Implemented Interfaces:
Configuration
Utility class for handling proxy connection settings.
-
Field Summary
FieldsFields inherited from interface org.eclipse.rdf4j.common.app.config.Configuration
DEFAULT_RESOURCES_LOCATION, DIR, RESOURCES_LOCATION -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddestroy()Clean up configuration resources.Get HTTP proxy port as stringGet HTTPS proxy hostGet the semicolon-separated list of hostnames starting with given strings, that do not use the proxy settings.booleanvoidinit()Initialize the configuration settings.voidload()(Re-)loads the proxy system properties.voidsave()Saves the currently known settings.voidsetFtpProxyHost(String ftpProxyHost) voidsetFtpProxyPort(String ftpProxyPort) voidsetHttpProxyHost(String httpProxyHost) voidsetHttpProxyPort(String httpProxyPort) Set HTTP proxy portvoidsetHttpsProxyHost(String httpsProxyHost) Get HTTPS proxy hostvoidsetHttpsProxyPort(String httpsProxyPort) voidsetNonProxyHostsStarting(String nonProxyHostsStarting) Set the semicolon separated list of hostnames starting with given strings, that do not use the proxy settings.voidsetProperty(String key, String val) voidsetProxiesEnabled(boolean proxiesEnabled) voidsetSocksProxyHost(String socksProxyHost) voidsetSocksProxyPort(String socksProxyPort)
-
Field Details
-
PROXY_SETTINGS_FILENAME
- See Also:
-
-
Constructor Details
-
ProxySettings
- Throws:
IOException
-
-
Method Details
-
setProperty
-
getProxiesEnabled
public boolean getProxiesEnabled() -
setProxiesEnabled
public void setProxiesEnabled(boolean proxiesEnabled) - Parameters:
proxiesEnabled-
-
getHttpProxyHost
- Returns:
- proxy
-
setHttpProxyHost
- Parameters:
httpProxyHost-
-
getHttpProxyPort
Get HTTP proxy port as string- Returns:
- proxy port
-
setHttpProxyPort
Set HTTP proxy port- Parameters:
httpProxyPort- proxy port
-
getHttpsProxyHost
Get HTTPS proxy host- Returns:
- proxy host as string
-
setHttpsProxyHost
Get HTTPS proxy host- Parameters:
httpsProxyHost-
-
getHttpsProxyPort
-
setHttpsProxyPort
-
getFtpProxyHost
-
setFtpProxyHost
-
getFtpProxyPort
-
setFtpProxyPort
-
getSocksProxyHost
-
setSocksProxyHost
-
getSocksProxyPort
-
setSocksProxyPort
-
getNonProxyHostsStarting
Get the semicolon-separated list of hostnames starting with given strings, that do not use the proxy settings. -
setNonProxyHostsStarting
Set the semicolon separated list of hostnames starting with given strings, that do not use the proxy settings. -
load
(Re-)loads the proxy system properties.- Specified by:
loadin interfaceConfiguration- Throws:
IOException- if the configuration settings could not be loaded due to an I/O problem.
-
save
Saves the currently known settings.- Specified by:
savein interfaceConfiguration- Throws:
IOException- if the configuration settings could not be saved due to an I/O problem.
-
destroy
Description copied from interface:ConfigurationClean up configuration resources.- Specified by:
destroyin interfaceConfiguration- Throws:
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.
-
init
Description copied from interface:ConfigurationInitialize the configuration settings.- Specified by:
initin interfaceConfiguration- Throws:
IOException- if the configuration settings could not be initialized because of an I/O problem.
-