jsky.util
Class ProxyServerUtil

java.lang.Object
  extended by jsky.util.ProxyServerUtil

public class ProxyServerUtil
extends java.lang.Object

A utility class for managing access to a proxy server. If set, a proxy server is used to access URLs, usually when a firewall is in place. The proxy server, specified as a host name and port number, does the HTTP GET for us and returns the result.

Version:
$Revision: 1.3 $
Author:
Allan Brighton
See Also:
ProxyServerDialog

Constructor Summary
ProxyServerUtil()
           
 
Method Summary
static void clearProxySettings()
          Removes any current proxy settings
static java.lang.String getHttpNonProxyHosts()
          Return the space separated list of domains not requiring a proxy for HTTP.
static java.lang.String getHttpProxyHost()
          Return the HTTP proxy server host name.
static int getHttpProxyPort()
          Return the HTTP proxy server port.
static java.lang.String getHttpsNonProxyHosts()
          Return the space separated list of domains not requiring a proxy for HTTPS.
static java.lang.String getHttpsProxyHost()
          Return the HTTPS proxy server host name.
static int getHttpsProxyPort()
          Return the HTTPS proxy server port.
static void init()
          This method should be called once at startup, so that any previous proxy settings are restored.
static void setProxy(java.lang.String httpProxyHost, int httpProxyPort, java.lang.String httpsProxyHost, int httpsProxyPort, java.lang.String httpNonProxyHosts, java.lang.String httpsNonProxyHosts)
          Set the proxy server information.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProxyServerUtil

public ProxyServerUtil()
Method Detail

init

public static void init()
This method should be called once at startup, so that any previous proxy settings are restored.


setProxy

public static void setProxy(java.lang.String httpProxyHost,
                            int httpProxyPort,
                            java.lang.String httpsProxyHost,
                            int httpsProxyPort,
                            java.lang.String httpNonProxyHosts,
                            java.lang.String httpsNonProxyHosts)
Set the proxy server information.

Parameters:
httpProxyHost - HTTP proxy server host
httpProxyPort - HTTP proxy server port number
httpsProxyHost - HTTPS proxy server host
httpsProxyPort - HTTPS proxy server port number
httpNonProxyHosts - a list of domains not requiring a proxy server (separated by spaces)

clearProxySettings

public static void clearProxySettings()
Removes any current proxy settings


getHttpProxyHost

public static java.lang.String getHttpProxyHost()
Return the HTTP proxy server host name.


getHttpProxyPort

public static int getHttpProxyPort()
Return the HTTP proxy server port.


getHttpsProxyHost

public static java.lang.String getHttpsProxyHost()
Return the HTTPS proxy server host name.


getHttpsProxyPort

public static int getHttpsProxyPort()
Return the HTTPS proxy server port.


getHttpNonProxyHosts

public static java.lang.String getHttpNonProxyHosts()
Return the space separated list of domains not requiring a proxy for HTTP.


getHttpsNonProxyHosts

public static java.lang.String getHttpsNonProxyHosts()
Return the space separated list of domains not requiring a proxy for HTTPS.