Package org.cip4.jdflib.util.net
Class ProxyUtil
java.lang.Object
org.cip4.jdflib.util.net.ProxyUtil
internal proxy handler
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic URIgetHostURI(URL url) get the uri of the host with protocol and port for proxy selectiongetProxiesWithLocal(URI uri) same as ProxySelector.getDefault() but always ensure that local is first in the liststatic Proxystatic booleanisUseSystemDefault(boolean use) static voidstatic voidsetup the environment for proxiesstatic voidsetUseSystemDefault(boolean use)
-
Constructor Details
-
ProxyUtil
public ProxyUtil()
-
-
Method Details
-
getHostURI
get the uri of the host with protocol and port for proxy selection- Parameters:
url-- Returns:
-
setUseSystemDefault
public static void setUseSystemDefault(boolean use) - Parameters:
use- , if true use the system proxy properties
-
isUseSystemDefault
public static boolean isUseSystemDefault(boolean use) - Parameters:
use- , the default if not set- Returns:
- if true use the system proxy properties
-
getProxiesWithLocal
same as ProxySelector.getDefault() but always ensure that local is first in the list- Parameters:
uri-- Returns:
-
setProxy
setup the environment for proxies- Parameters:
proxy- the proxy url - NO PORT!port- the proxy portuser- the user for authentication, if null no authentication is attemptedpw- the pass word for authentication
-
setProxy
- Parameters:
proxy-
-
getProxy
-