com.sibvisions.util
Class ProxyUtil

java.lang.Object
  extended by com.sibvisions.util.ProxyUtil

public final class ProxyUtil
extends Object

The ProxyUtil detects a system proxy.


Method Summary
static Proxy getSystemProxy(String pURL)
          Gets the system proxy for the given URL.
static void main(String[] pArgs)
          Starts system proxy detection.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

main

public static void main(String[] pArgs)
                 throws Exception
Starts system proxy detection.

Parameters:
pArgs - the first parameter should contain the http(s) URL
Throws:
Exception - if detection fails

getSystemProxy

public static Proxy getSystemProxy(String pURL)
                            throws Exception
Gets the system proxy for the given URL. If a proxy is detected, it will be re-used for other URLs too. Multi-Proxy environments are not supported.

Parameters:
pURL - the URL
Returns:
the detected proxy or null if no proxy is detected or used
Throws:
Exception - if detection fails


Copyright © 2009 SIB Visions GmbH. All Rights Reserved.