aboutsummaryrefslogtreecommitdiffstats
path: root/plugin/icedteanp/java/sun/applet/PluginProxySelector.java
diff options
context:
space:
mode:
authorOmair Majid <[email protected]>2010-11-23 10:05:06 -0500
committerOmair Majid <[email protected]>2010-11-23 10:05:06 -0500
commit870e7d61c514309119de218c3d7181ceeeffcb38 (patch)
tree5f7bc0ac13c08275d872bc645e20716c5f51b627 /plugin/icedteanp/java/sun/applet/PluginProxySelector.java
parentb2311631f029fd5f77e62d36807678a099bd6a4d (diff)
integrate basic proxy configuration support
2010-11-23 Omair Majid <[email protected]> * netx/net/sourceforge/jnlp/runtime/DeploymentConfiguration.java: Add KEY_PROXY_TYPE, KEY_PROXY_SAME, KEY_PROXY_AUTO_CONFIG_URL, KEY_PROXY_BYPASS_LIST, KEY_PROXY_BYPASS_LOCAL, KEY_PROXY_HTTP_HOST, KEY_PROXY_HTTP_PORT, KEY_PROXY_HTTPS_HOST, KEY_PROXY_HTTPS_PORT, KEY_PROXY_FTP_HOST, KEY_PROXY_FTP_PORT, KEY_PROXY_SOCKS4_HOST, KEY_PROXY_SOCKS4_PORT, and KEY_PROXY_OVERRIDE_HOSTS. (loadDefaultProperties): Use the new constants. * netx/net/sourceforge/jnlp/runtime/JNLPProxySelector.java: New class. (JNLPProxySelector): New method. (parseConfiguration): New method. Initializes this object by querying the configuration. (getHost): New method. (getPort): New method. (connectFailed): New method. (select): New method. Returns a list of appropriate proxies to use for a given uri. (inBypassList): New method. Return true if the host in the URI should be bypassed for proxy purposes. (isLocalHost): New method. (getFromConfiguration): New method. Finds a proxy based on configuration. (getFromPAC): New method. (getFromBrowser): New method. * netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java (initialize): Install proxy selector and authenticator. * plugin/icedteanp/java/sun/applet/PluginMain.java (init): Do not install authenticator. (CustomAuthenticator): Moved to... * netx/net/sourceforge/jnlp/security/JNLPAuthenticator.java: Here. * plugin/icedteanp/java/sun/applet/PasswordAuthenticationDialog.java Moved to... * netx/net/sourceforge/jnlp/security /PasswordAuthenticationDialog.java: Here. * plugin/icedteanp/java/sun/applet/PluginProxySelector.java: Extend JNLPProxySelector. (select): Renamed to... (getFromBrowser): New method.
Diffstat (limited to 'plugin/icedteanp/java/sun/applet/PluginProxySelector.java')
-rw-r--r--plugin/icedteanp/java/sun/applet/PluginProxySelector.java17
1 files changed, 4 insertions, 13 deletions
diff --git a/plugin/icedteanp/java/sun/applet/PluginProxySelector.java b/plugin/icedteanp/java/sun/applet/PluginProxySelector.java
index dff8ded..f6a096f 100644
--- a/plugin/icedteanp/java/sun/applet/PluginProxySelector.java
+++ b/plugin/icedteanp/java/sun/applet/PluginProxySelector.java
@@ -37,18 +37,16 @@ exception statement from your version. */
package sun.applet;
-import java.io.IOException;
-import java.net.InetAddress;
import java.net.InetSocketAddress;
import java.net.Proxy;
-import java.net.ProxySelector;
-import java.net.SocketAddress;
import java.net.URI;
import java.util.Date;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
+import net.sourceforge.jnlp.runtime.JNLPProxySelector;
+
/**
* Proxy selector implementation for plugin network functions.
*
@@ -58,17 +56,10 @@ import java.util.List;
*
*/
-public class PluginProxySelector extends ProxySelector {
+public class PluginProxySelector extends JNLPProxySelector {
private TimedHashMap<String, Proxy> proxyCache = new TimedHashMap<String, Proxy>();
-
- @Override
- public void connectFailed(URI uri, SocketAddress sa, IOException ioe) {
- // If the connection fails, there is little we can do here. Just print the exception
- ioe.printStackTrace();
- }
-
/**
* Selects the appropriate proxy (or DIRECT connection method) for the given URI
*
@@ -76,7 +67,7 @@ public class PluginProxySelector extends ProxySelector {
* @return A list of Proxy objects that are usable for this URI
*/
@Override
- public List<Proxy> select(URI uri) {
+ protected List<Proxy> getFromBrowser(URI uri) {
List<Proxy> proxyList = new ArrayList<Proxy>();