jsky.util
Class ProxyServerUtil

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

public class ProxyServerUtil
extends 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.2 $
Author:
Allan Brighton
See Also:
ProxyServerDialog

Constructor Summary
ProxyServerUtil()
           
 
Method Summary
static String getHost()
          Return the proxy server host name.
static String getNonProxyHosts()
          Return the space separated list of domains not requiring a proxy.
static int getPort()
          Return the 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(String host, int port, String nonProxyHosts)
          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(String host,
                            int port,
                            String nonProxyHosts)
Set the proxy server information.

Parameters:
host - proxy server host
port - proxy server port number
nonProxyHosts - a list of domains not requiring a proxy server (separated by spaces)

getHost

public static String getHost()
Return the proxy server host name.


getPort

public static int getPort()
Return the proxy server port.


getNonProxyHosts

public static String getNonProxyHosts()
Return the space separated list of domains not requiring a proxy.



Copyright © 2015 Central Laboratory of the Research Councils. All Rights Reserved.