Class ProxySettings


public class ProxySettings extends Object
Responsible for all things related to proxies. This includes storing the manually-set proxy host and port (if any), deciding what proxy, if any, to use for a given request (determined by manual or system settings), and serving up username/password credentials if required for an authenticating proxy. The one thing this class does not do is handle prompting the user for username and password if necessary. That is handled in Mathematica code triggered by a 407 HTTP status. The HttpHandler instance holds one instance of this class and uses it when necessary or passes it to other classes that need to use it.
  • Field Details

  • Method Details

    • getInstance

      public static ProxySettings getInstance()
    • setProxyInfo

      public void setProxyInfo(int useProxy, String httpProxyHost, int httpProxyPort)
    • setProxyUsername

      public void setProxyUsername(String username)
    • setProxyPassword

      public void setProxyPassword(String password)
    • getProxyHostAndPort

      public String[] getProxyHostAndPort(String url)
    • getProxyForHttpClient

      public org.apache.http.HttpHost getProxyForHttpClient(String url)
    • getProxyForJavaNet

      public Proxy getProxyForJavaNet(String url)