Class JNLPProxySelector
java.lang.Object
java.net.ProxySelector
net.sourceforge.jnlp.proxy.JNLPProxySelector
- Direct Known Subclasses:
FirefoxProxySelector
A ProxySelector specific to JNLPs. This proxy uses the deployment
configuration to determine what to do.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate URLthe URL to the PAC filea list of URLs that should be bypassed for proxy purposesprivate booleanwhether localhost should be bypassed for proxy purposesprivate static final Loggerprivate PacEvaluatorprivate final Stringprivate final intprivate final Stringprivate final intprivate final Stringprivate final intprivate final Stringprivate final intprivate final ProxyTypeThe proxy type.private final booleanwhether the http proxy should be used for https and ftp protocols as well -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidconnectFailed(URI uri, SocketAddress sa, IOException ioe) getFromArguments(URI uri, boolean sameProxy, boolean sameProxyIncludesSocket, String proxyHttpsHost, int proxyHttpsPort, String proxyHttpHost, int proxyHttpPort, String proxyFtpHost, int proxyFtpPort, String proxySocks4Host, int proxySocks4Port) Returns a list of proxies by using the argumentsgetFromBrowser(URI uri) Returns a list of proxies by querying the browsergetFromConfiguration(URI uri) Returns a list of proxies by using the information in the deployment configurationgetFromPAC(URI uri) Returns a list of proxies by using the Proxy Auto Config (PAC) file.private StringgetHost(DeploymentConfiguration config, String key) Uses the given key to get a host from the configurationprivate intgetPort(DeploymentConfiguration config, String key) Uses the given key to get a port from the configurationprivate booleaninBypassList(URI uri) Returns true if the uri should be bypassed for proxy purposesMethods inherited from class ProxySelector
getDefault, of, setDefault
-
Field Details
-
LOG
-
pacEvaluator
-
autoConfigUrl
the URL to the PAC file -
bypassLocal
private boolean bypassLocalwhether localhost should be bypassed for proxy purposes -
proxyType
The proxy type. See PROXY_TYPE_* constants -
proxyHttpHost
-
proxyHttpPort
private final int proxyHttpPort -
proxyHttpsHost
-
proxyHttpsPort
private final int proxyHttpsPort -
proxyFtpHost
-
proxyFtpPort
private final int proxyFtpPort -
proxySocks4Host
-
proxySocks4Port
private final int proxySocks4Port -
bypassList
-
sameProxy
private final boolean sameProxywhether the http proxy should be used for https and ftp protocols as well
-
-
Constructor Details
-
JNLPProxySelector
-
-
Method Details
-
getHost
Uses the given key to get a host from the configuration -
getPort
Uses the given key to get a port from the configuration -
connectFailed
- Specified by:
connectFailedin classProxySelector
-
select
- Specified by:
selectin classProxySelector- Returns:
- list of proxies on URI
-
inBypassList
Returns true if the uri should be bypassed for proxy purposes -
getFromConfiguration
-
getFromArguments
protected static List<Proxy> getFromArguments(URI uri, boolean sameProxy, boolean sameProxyIncludesSocket, String proxyHttpsHost, int proxyHttpsPort, String proxyHttpHost, int proxyHttpPort, String proxyFtpHost, int proxyFtpPort, String proxySocks4Host, int proxySocks4Port) Returns a list of proxies by using the arguments- Parameters:
uri- name and code says it allsameProxy- name and code says it allsameProxyIncludesSocket- name and code says it allproxyHttpsHost- name and code says it allproxyHttpsPort- name and code says it allproxyHttpHost- name and code says it allproxyHttpPort- name and code says it allproxyFtpHost- name and code says it allproxyFtpPort- name and code says it allproxySocks4Host- name and code says it allproxySocks4Port- name and code says it all- Returns:
- a List of Proxy objects
-
getFromPAC
-
getFromBrowser
-