Class ProxySettings

  • All Implemented Interfaces:
    Configuration

    public class ProxySettings
    extends Object
    implements Configuration
    Utility class for handling proxy connection settings.
    • Method Detail

      • setProperty

        public void setProperty​(String key,
                                String val)
      • getProxiesEnabled

        public boolean getProxiesEnabled()
      • setProxiesEnabled

        public void setProxiesEnabled​(boolean proxiesEnabled)
        Parameters:
        proxiesEnabled -
      • getHttpProxyHost

        public String getHttpProxyHost()
        Returns:
        proxy
      • setHttpProxyHost

        public void setHttpProxyHost​(String httpProxyHost)
        Parameters:
        httpProxyHost -
      • getHttpProxyPort

        public String getHttpProxyPort()
        Get HTTP proxy port as string
        Returns:
        proxy port
      • setHttpProxyPort

        public void setHttpProxyPort​(String httpProxyPort)
        Set HTTP proxy port
        Parameters:
        httpProxyPort - proxy port
      • getHttpsProxyHost

        public String getHttpsProxyHost()
        Get HTTPS proxy host
        Returns:
        proxy host as string
      • setHttpsProxyHost

        public void setHttpsProxyHost​(String httpsProxyHost)
        Get HTTPS proxy host
        Parameters:
        httpsProxyHost -
      • getHttpsProxyPort

        public String getHttpsProxyPort()
      • setHttpsProxyPort

        public void setHttpsProxyPort​(String httpsProxyPort)
      • getFtpProxyHost

        public String getFtpProxyHost()
      • setFtpProxyHost

        public void setFtpProxyHost​(String ftpProxyHost)
      • getFtpProxyPort

        public String getFtpProxyPort()
      • setFtpProxyPort

        public void setFtpProxyPort​(String ftpProxyPort)
      • getSocksProxyHost

        public String getSocksProxyHost()
      • setSocksProxyHost

        public void setSocksProxyHost​(String socksProxyHost)
      • getSocksProxyPort

        public String getSocksProxyPort()
      • setSocksProxyPort

        public void setSocksProxyPort​(String socksProxyPort)
      • getNonProxyHostsStarting

        public String getNonProxyHostsStarting()
        Get the semicolon-separated list of hostnames starting with given strings, that do not use the proxy settings.
      • setNonProxyHostsStarting

        public void setNonProxyHostsStarting​(String nonProxyHostsStarting)
        Set the semicolon separated list of hostnames starting with given strings, that do not use the proxy settings.
      • load

        public void load()
                  throws IOException
        (Re-)loads the proxy system properties.
        Specified by:
        load in interface Configuration
        Throws:
        IOException - if the configuration settings could not be loaded due to an I/O problem.
      • save

        public void save()
                  throws IOException
        Saves the currently known settings.
        Specified by:
        save in interface Configuration
        Throws:
        IOException - if the configuration settings could not be saved due to an I/O problem.
      • destroy

        public void destroy()
                     throws IOException
        Description copied from interface: Configuration
        Clean up configuration resources.
        Specified by:
        destroy in interface Configuration
        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

        public void init()
                  throws IOException
        Description copied from interface: Configuration
        Initialize the configuration settings.
        Specified by:
        init in interface Configuration
        Throws:
        IOException - if the configuration settings could not be initialized because of an I/O problem.