| java.lang.Object org.netbeans.installer.sandbox.download.proxy.Proxy
Proxy | public class Proxy (Code) | | A representation of a proxy. Connections are expected to use proxies registered
in DownloadManager to alter their way to connect to remote machines (if
supported/requried). Unlike the standard java.net.Proxy , this class
provides support for encapsulating the required username/password credentials as
well as the list of hosts for which this proxy should be bypassed.
author: Kirill Sorokin |
Inner Class :public static enum ProxyType | |
Constructor Summary | |
public | Proxy(ProxyType type, String host, int port) Constructs a new instance of Proxy . | public | Proxy(ProxyType type, String host, int port, String[] nonProxyHosts) Constructs a new instance of Proxy . | public | Proxy(ProxyType type, String host, int port, String username, String password, String[] nonProxyHosts) Constructs a new instance of Proxy . |
Method Summary | |
public String | getHost() Getter for the myHost property. | public String[] | getNonProxyHosts() Getter for the myNonProxyHosts property. | public String | getPassword() Getter for the myPassword property. | public int | getPort() Getter for the myPort property. | public ProxyType | getType() Getter for the myType property. | public String | getUsername() Getter for the myUsername property. | public static Proxy | parseProxy(ProxyType type, String hostProperty, String portProperty, String nonProxyHostsProperty) Constructs a Proxy using the values of the supplied system
properties. | public boolean | skipProxyForHost(String host) Checks whether the given host should be reached via the proxy or the proxy
should be bypassed.
Parameters: host - The host to check. |
Proxy | public Proxy(ProxyType type, String host, int port)(Code) | | Constructs a new instance of Proxy . The username, password and
the list of hosts for which to bypass this proxy are set to null, null and
an empty array correspondingly.
Parameters: type - The type of this proxy. Parameters: host - The host of this proxy. Parameters: port - The port of this proxy. |
Proxy | public Proxy(ProxyType type, String host, int port, String[] nonProxyHosts)(Code) | | Constructs a new instance of Proxy . The username and password
are set to null.
Parameters: type - The type of this proxy. Parameters: host - The host of this proxy. Parameters: port - The port of this proxy. Parameters: nonProxyHosts - The list of hosts for which this proxy should bebypassed. |
Proxy | public Proxy(ProxyType type, String host, int port, String username, String password, String[] nonProxyHosts)(Code) | | Constructs a new instance of Proxy .
Parameters: type - The type of this proxy. Parameters: host - The host of this proxy. Parameters: port - The port of this proxy. Parameters: username - The username to be used to authenticate with this proxy. Parameters: password - The password to be used to authenticate with this proxy. Parameters: nonProxyHosts - The list of hosts for which this proxy should bebypassed. |
getHost | public String getHost()(Code) | | Getter for the myHost property.
The host of this proxy. |
getNonProxyHosts | public String[] getNonProxyHosts()(Code) | | Getter for the myNonProxyHosts property.
The list of hosts for which this proxy should be bypassed. |
getPassword | public String getPassword()(Code) | | Getter for the myPassword property.
The password to be used to authenticate with this proxy. |
getPort | public int getPort()(Code) | | Getter for the myPort property.
The port of this proxy. |
getType | public ProxyType getType()(Code) | | Getter for the myType property.
The type of this proxy. |
getUsername | public String getUsername()(Code) | | Getter for the myUsername property.
The username to be used to authenticate with this proxy. |
parseProxy | public static Proxy parseProxy(ProxyType type, String hostProperty, String portProperty, String nonProxyHostsProperty)(Code) | | Constructs a Proxy using the values of the supplied system
properties. It is used in the DownloadManager to register all the
proxies defined by the system (useful when the application is started via JNLP
or an applet.
Parameters: type - The type of proxy to be constructed. Parameters: hostProperty - The name of the system property which holds the proxyhost. Parameters: portProperty - The name of the system property which holds the proxyport. Parameters: nonProxyHostsProperty - The name of the system property which holds thelist of hosts for which the proxy should be bypassed. The constructed Proxy or null if somethingdid not allow to parse the data correctly. |
skipProxyForHost | public boolean skipProxyForHost(String host)(Code) | | Checks whether the given host should be reached via the proxy or the proxy
should be bypassed.
Parameters: host - The host to check. true is the proxy should be bypassed, false otherwise. |
|
|