| java.lang.Object org.netbeans.modules.proxy.ConnectivitySettings
ConnectivitySettings | public class ConnectivitySettings (Code) | | This data object encapsulates parameters that are needed to establish connection to an arbitrary remote IP address.
There are basically 2 types of connectivity:
- direct connection (without any firewall or proxy, or with a transparent proxy)
- mediated connection that routes via a firewall or proxy
If this object represents a direct connection type, no further parameters are required. If this object
represents a proxy connection, it also hold the proxy type, address, and port. Other optional parameters
include proxy username and password.
author: Maros Sandor |
Field Summary | |
final public static int | CONNECTION_DIRECT Connection type constant for a direct connection. | final public static int | CONNECTION_VIA_HTTPS Connection type constant for connection via HTTP proxies. | final public static int | CONNECTION_VIA_SOCKS Connection type constant for connection via SOCKS proxies. |
Constructor Summary | |
public | ConnectivitySettings() Constructs connectivity settings with the default connection setting (direct connection). |
CONNECTION_DIRECT | final public static int CONNECTION_DIRECT(Code) | | Connection type constant for a direct connection.
|
CONNECTION_VIA_HTTPS | final public static int CONNECTION_VIA_HTTPS(Code) | | Connection type constant for connection via HTTP proxies.
|
CONNECTION_VIA_SOCKS | final public static int CONNECTION_VIA_SOCKS(Code) | | Connection type constant for connection via SOCKS proxies.
|
ConnectivitySettings | public ConnectivitySettings()(Code) | | Constructs connectivity settings with the default connection setting (direct connection).
|
getConnectionType | public int getConnectionType()(Code) | | |
getKeepAliveIntervalSeconds | public int getKeepAliveIntervalSeconds()(Code) | | |
getProxyPassword | public char[] getProxyPassword()(Code) | | |
getProxyPort | public int getProxyPort()(Code) | | |
setConnectionType | public void setConnectionType(int connectionType)(Code) | | |
setKeepAliveIntervalSeconds | public void setKeepAliveIntervalSeconds(int keepAliveIntervalSeconds)(Code) | | |
setProxy | public void setProxy(int type, String host, int port, String username, char[] proxyPassword)(Code) | | Changes configuration of this connectivity settings.
Parameters: type - one of the connection type constants Parameters: host - proxy hostname, must not be null for proxy configurations, is ignored for direct connectivity. Parameters: port - proxy port, must be in range 1-65535 for proxy configurations, is ignored for direct connectivity. Parameters: username - a username to supply to proxy when it request user authentication, may be null if the proxydoes not require authentication or we use direct connection Parameters: proxyPassword - password to supply to proxy when it request user authentication, may be null if the proxydoes not require authentication or we use direct connection throws: java.lang.IllegalArgumentException - if the connection type constant is illegal, the proxy number is out of range orthe proxy host is empty or null (for non-direct connections) |
setProxyHost | public void setProxyHost(String proxyHost)(Code) | | |
setProxyPassword | public void setProxyPassword(char[] proxyPassword)(Code) | | |
setProxyPort | public void setProxyPort(int proxyPort)(Code) | | |
setProxyUsername | public void setProxyUsername(String proxyUsername)(Code) | | |
|
|