Package net.sourceforge.jnlp.runtime
Class JNLPProxySelector
java.lang.Object
java.net.ProxySelector
net.sourceforge.jnlp.runtime.JNLPProxySelector
A ProxySelector specific to JNLPs. This proxy uses the deployment
configuration to determine what to do.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
The default port to use as a fallback.static final int
static final int
static final int
static final int
static final int
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
connectFailed
(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 browsergetFromPAC
(URI uri) Returns a list of proxies by using the Proxy Auto Config (PAC) file.getProxiesFromPacResult
(String pacString) Converts a proxy string from a browser into a List of Proxy objects suitable for java.Methods inherited from class java.net.ProxySelector
getDefault, of, setDefault
-
Field Details
-
PROXY_TYPE_UNKNOWN
public static final int PROXY_TYPE_UNKNOWN- See Also:
-
PROXY_TYPE_NONE
public static final int PROXY_TYPE_NONE- See Also:
-
PROXY_TYPE_MANUAL
public static final int PROXY_TYPE_MANUAL- See Also:
-
PROXY_TYPE_AUTO
public static final int PROXY_TYPE_AUTO- See Also:
-
PROXY_TYPE_BROWSER
public static final int PROXY_TYPE_BROWSER- See Also:
-
FALLBACK_PROXY_PORT
public static final int FALLBACK_PROXY_PORTThe default port to use as a fallback. Currently squid's default port- See Also:
-
-
Constructor Details
-
JNLPProxySelector
-
-
Method Details
-
connectFailed
- Specified by:
connectFailed
in classProxySelector
-
select
- Specified by:
select
in classProxySelector
- Returns:
- list of proxies on URI
-
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
Returns a list of proxies by using the Proxy Auto Config (PAC) file. See http://en.wikipedia.org/wiki/Proxy_auto-config#The_PAC_file for more information.- Parameters:
uri
- uri to PAC- Returns:
- a List of valid Proxy objects
-
getFromBrowser
Returns a list of proxies by querying the browser- Parameters:
uri
- the uri to get proxies for- Returns:
- a list of proxies
-
getProxiesFromPacResult
Converts a proxy string from a browser into a List of Proxy objects suitable for java.- Parameters:
pacString
- a string indicating proxies. For example "PROXY foo.bar:3128; DIRECT"- Returns:
- a list of Proxy objects representing the parsed string. In case of malformed input, an empty list may be returned
-