Package com.wolfram.alpha.net
Class ProxySettings
java.lang.Object
com.wolfram.alpha.net.ProxySettings
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 Summary
FieldsModifier and TypeFieldDescriptionstatic intstatic intstatic int -
Method Summary
Modifier and TypeMethodDescriptionstatic ProxySettingsorg.apache.http.HttpHostgetProxyForHttpClient(String url)getProxyForJavaNet(String url)String[]getProxyHostAndPort(String url)voidsetProxyInfo(int useProxy, String httpProxyHost, int httpProxyPort)voidsetProxyPassword(String password)voidsetProxyUsername(String username)
-
Field Details
-
PROXY_NONE
public static final int PROXY_NONE- See Also:
- Constant Field Values
-
PROXY_AUTOMATIC
public static final int PROXY_AUTOMATIC- See Also:
- Constant Field Values
-
PROXY_MANUAL
public static final int PROXY_MANUAL- See Also:
- Constant Field Values
-
-
Method Details
-
getInstance
-
setProxyInfo
-
setProxyUsername
-
setProxyPassword
-
getProxyHostAndPort
-
getProxyForHttpClient
-
getProxyForJavaNet
-