com.cleancode.net
Class NetProxy

java.lang.Object
  extended by com.cleancode.net.NetProxy

public final class NetProxy
extends Object

Configures access to a secure or non-secure proxy server.

Since:
CleanCode 0.9.01
Version:
$Revision: 9 $
Author:
Michael Sorens

Field Summary
static String DEFAULT_PORT
          Default port to be used if none specified.
static String VERSION
          Current version of this class.
 
Method Summary
static void setProxy(String proxyProperty, boolean secure)
          Sets a system proxy from a proxyProperty and a secure flag.
static void setProxy(String proxyProperty, String urlString)
          Sets a system proxy from a proxyProperty and a url.
static void setProxy(String proxyHost, String proxyPort, boolean secure)
          Sets a system proxy from separate host and port designators and a secure flag.
static void setProxy(String proxyHost, String proxyPort, String urlString)
          Sets a system proxy from separate host and port designators and a url.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

VERSION

public static final String VERSION
Current version of this class.


DEFAULT_PORT

public static final String DEFAULT_PORT
Default port to be used if none specified.

See Also:
Constant Field Values
Method Detail

setProxy

public static void setProxy(String proxyProperty,
                            String urlString)
Sets a system proxy from a proxyProperty and a url.

Parameters:
proxyProperty - proxy server and port in the form "host:port"; if the port designator is omitted, the NetProxy.DEFAULT_PORT port will be used.
urlString - url that will be accessed (used to determine whether to set proxy for secure or non-secure access).

setProxy

public static void setProxy(String proxyProperty,
                            boolean secure)
Sets a system proxy from a proxyProperty and a secure flag.

Parameters:
proxyProperty - proxy server and port in the form "host:port"; if the port designator is omitted, the NetProxy.DEFAULT_PORT port will be used.
secure - boolean flag indicating to set proxy for secure or non-secure access).

setProxy

public static void setProxy(String proxyHost,
                            String proxyPort,
                            String urlString)
Sets a system proxy from separate host and port designators and a url.

Parameters:
proxyHost - proxy server host
proxyPort - proxy server port
urlString - url that will be accessed (used to determine whether to set proxy for secure or non-secure access).

setProxy

public static void setProxy(String proxyHost,
                            String proxyPort,
                            boolean secure)
Sets a system proxy from separate host and port designators and a secure flag.

Parameters:
proxyHost - proxy server host
proxyPort - proxy server port
secure - boolean flag indicating to set proxy for secure or non-secure access).


CleanCode Java Libraries Copyright © 2001-2012 Michael Sorens - Revised 2012.12.10 Get CleanCode at SourceForge.net. Fast, secure and Free Open Source software downloads