esmska.transfer
Class ProxyManager

java.lang.Object
  extended by esmska.transfer.ProxyManager

public class ProxyManager
extends java.lang.Object

Sets system-wide internet proxies.


Nested Class Summary
static class ProxyManager.ProxyType
           
 
Constructor Summary
ProxyManager()
           
 
Method Summary
static org.apache.commons.httpclient.ProxyHost getProxyHost(ProxyManager.ProxyType proxyType)
          Get ProxyHost for current proxy settings for a particular proxy type
static void setProxy(java.lang.String httpProxy, java.lang.String httpsProxy, java.lang.String socksProxy)
          Set system-wide proxy.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProxyManager

public ProxyManager()
Method Detail

setProxy

public static void setProxy(java.lang.String httpProxy,
                            java.lang.String httpsProxy,
                            java.lang.String socksProxy)
Set system-wide proxy.

Parameters:
httpProxy - proxy for HTTP in form "host" or "host:port". Use null or empty string for unsetting the proxy.
httpsProxy - proxy for HTTPS in form "host" or "host:port". Use null or empty string for unsetting the proxy.
socksProxy - proxy for SOCKS in form "host" or "host:port". Use null or empty string for unsetting the proxy.

getProxyHost

public static org.apache.commons.httpclient.ProxyHost getProxyHost(ProxyManager.ProxyType proxyType)
Get ProxyHost for current proxy settings for a particular proxy type

Parameters:
proxyType - proxy type, not null
Returns:
ProxyHost for current proxy settings or null if no proxy set