com.sibvisions.util
Class ProxyUtil

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

public final class ProxyUtil
extends java.lang.Object

The ProxyUtil detects a system proxy.


Method Summary
static java.net.Proxy getSystemProxy(java.lang.String pURL)
          Gets the system proxy for the given URL.
static void main(java.lang.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(java.lang.String[] pArgs)
                 throws java.lang.Exception
Starts system proxy detection.

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

getSystemProxy

public static java.net.Proxy getSystemProxy(java.lang.String pURL)
                                     throws java.lang.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:
java.lang.Exception - if detection fails


Copyright © 2009 SIB Visions GmbH. All Rights Reserved.