com.jniwrapper.win32.ie.proxy
Class ProxyConfiguration

java.lang.Object
  extended bycom.jniwrapper.win32.ie.proxy.ProxyConfiguration

public class ProxyConfiguration
extends java.lang.Object


Nested Class Summary
static interface ProxyConfiguration.ConnectionType
          Contains the connections type constants.
static interface ProxyConfiguration.ServerType
          Contains the server type constants.
static interface ProxyConfiguration.Type
          Contains the proxy configuration types.
 
Constructor Summary
ProxyConfiguration()
           
 
Method Summary
 java.lang.Object clone()
           
 java.lang.String getAutoconfigProxyAddress()
          Returns a string that represents a path to the script that contains proxy configuration.
 int getConnectionType()
          Returns a connection type for the current proxy configuration.
 java.lang.String getPassword(int serverType)
          Returns a string that represents password for a specified server type.
 java.lang.String getProxy(int serverType)
          Returns proxy address for a specified server type.
 java.util.Set getProxyExceptions()
          Returns a set of strings that represent proxy exceptions.
 java.lang.String getUserName(int serverType)
          Returns a string that represents user name for a specified server type.
 boolean isIgnoreProxyForLocalAddresses()
          Returns TRUE if local addresses are ignored by proxy server, otherwise - FALSE.
 void setAutoconfigProxyAddress(java.lang.String address)
          Sets a string that represents a path to the script that contains proxy configuration.
 void setConnectionType(int type)
          Sets a specified connection type for the current proxy configuration.
 void setIgnoreProxyForLocalAddresses(boolean ignore)
          Enables or disables ignoring proxy server for local addresses.
 void setPassowrd(java.lang.String password, int serverType)
          Sets password for a specified server type.
 void setProxy(java.lang.String proxyAddress, int serverType)
          Sets proxy address for a specified server type.
 void setProxyExceptions(java.util.Set exceptions)
          Sets a set of strings that represent proxy exceptions.
 void setUserName(java.lang.String userName, int serverType)
          Sets a user name for a specified server type.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProxyConfiguration

public ProxyConfiguration()
Method Detail

setProxy

public void setProxy(java.lang.String proxyAddress,
                     int serverType)
Sets proxy address for a specified server type.

Proxy address represents a string in the following format: "address:port". For example: 127.0.0.1:8081

Parameters:
proxyAddress - a string in the following format: "address:port". For example: 127.0.0.1:8081
serverType - specified server type. One of the following values: ProxyConfiguration.ServerType.HTTP, ProxyConfiguration.ServerType.FTP, ProxyConfiguration.ServerType.SECURE, ProxyConfiguration.ServerType.SOCKS or ProxyConfiguration.ServerType.GOPHER

getProxy

public java.lang.String getProxy(int serverType)
Returns proxy address for a specified server type.

Parameters:
serverType - specified server type. One of the following values: ProxyConfiguration.ServerType.HTTP, ProxyConfiguration.ServerType.FTP, ProxyConfiguration.ServerType.SECURE, ProxyConfiguration.ServerType.SOCKS or ProxyConfiguration.ServerType.GOPHER
Returns:
String that represents proxy address in the following format: "address:port". For example: 127.0.0.1:8081

setUserName

public void setUserName(java.lang.String userName,
                        int serverType)
Sets a user name for a specified server type. At present this method supports only ProxyConfiguration.ServerType.HTTP server type. In other cases this method will throw the IllegalArgumentException error.

Parameters:
userName - a string that represents user name.
serverType - specified server type. At presents supports only ProxyConfiguration.ServerType.HTTP server type.
Throws:
java.lang.IllegalArgumentException - when the serverType isn't equals to ProxyConfiguration.ServerType.HTTP value.

getUserName

public java.lang.String getUserName(int serverType)
Returns a string that represents user name for a specified server type.

Parameters:
serverType - specified server type. One of the following values: ProxyConfiguration.ServerType.HTTP, ProxyConfiguration.ServerType.FTP, ProxyConfiguration.ServerType.SECURE, ProxyConfiguration.ServerType.SOCKS or ProxyConfiguration.ServerType.GOPHER
Returns:
String that represents user name.

setPassowrd

public void setPassowrd(java.lang.String password,
                        int serverType)
Sets password for a specified server type. At present this method supports only ProxyConfiguration.ServerType.HTTP server type. In other cases this method will throw the IllegalArgumentException error.

Parameters:
password - a string that represents password.
serverType - specified server type. At presents supports only ProxyConfiguration.ServerType.HTTP server type.
Throws:
java.lang.IllegalArgumentException - when the serverType isn't equals to ProxyConfiguration.ServerType.HTTP value.

getPassword

public java.lang.String getPassword(int serverType)
Returns a string that represents password for a specified server type.

Parameters:
serverType - specified server type. One of the following values: ProxyConfiguration.ServerType.HTTP, ProxyConfiguration.ServerType.FTP, ProxyConfiguration.ServerType.SECURE, ProxyConfiguration.ServerType.SOCKS or ProxyConfiguration.ServerType.GOPHER
Returns:
String that represents password.

setProxyExceptions

public void setProxyExceptions(java.util.Set exceptions)
Sets a set of strings that represent proxy exceptions.

Proxy server will be not used for addresses beginning with these strings.

Parameters:
exceptions - a set of strings that represent proxy exceptions.

getProxyExceptions

public java.util.Set getProxyExceptions()
Returns a set of strings that represent proxy exceptions.

Proxy server will be not used for addresses beginning with these strings.

Returns:
a set of strings that represent proxy exceptions.

setIgnoreProxyForLocalAddresses

public void setIgnoreProxyForLocalAddresses(boolean ignore)
Enables or disables ignoring proxy server for local addresses.

Parameters:
ignore - TRUE if local addresses are ignored by proxy server, otherwise - FALSE

isIgnoreProxyForLocalAddresses

public boolean isIgnoreProxyForLocalAddresses()
Returns TRUE if local addresses are ignored by proxy server, otherwise - FALSE.

Returns:
Returns TRUE if local addresses are ignored by proxy server, otherwise - FALSE.

setAutoconfigProxyAddress

public void setAutoconfigProxyAddress(java.lang.String address)
Sets a string that represents a path to the script that contains proxy configuration.

Parameters:
address - a string that represents a path to the script that contains proxy configuration.

getAutoconfigProxyAddress

public java.lang.String getAutoconfigProxyAddress()
Returns a string that represents a path to the script that contains proxy configuration.

Returns:
a string that represents a path to the script that contains proxy configuration.

setConnectionType

public void setConnectionType(int type)
Sets a specified connection type for the current proxy configuration.

Possible values:


getConnectionType

public int getConnectionType()
Returns a connection type for the current proxy configuration.

Returns:
one of the following values:
  • ConnectionType.DIRECT
  • ConnectionType.PROXY
  • ConnectionType.AUTO_PROXY_URL
  • ConnectionType.AUTO_DETECT

clone

public java.lang.Object clone()