Class Proxy
- java.lang.Object
-
- org.codehaus.cargo.util.log.LoggedObject
-
- org.codehaus.cargo.container.installer.Proxy
-
- All Implemented Interfaces:
Loggable
public class Proxy extends LoggedObject
Nested Ant element to specify proxy properties.
-
-
Constructor Summary
Constructors Constructor Description Proxy()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclear(Map<String,String> previousProperties)Clear all proxy settings.Map<String,String>configure()Set the Java system properties related to proxies.StringgetExcludeHosts()StringgetHost()StringgetPassword()intgetPort()StringgetUser()voidsetExcludeHosts(String proxyExcludeHosts)List of hosts which should be connected too directly and not through the proxy server.voidsetHost(String host)voidsetPassword(String password)voidsetPort(int port)voidsetUser(String user)-
Methods inherited from class org.codehaus.cargo.util.log.LoggedObject
getLogger, setLogger
-
-
-
-
Method Detail
-
setHost
public void setHost(String host)
- Parameters:
host- the proxy host
-
getHost
public String getHost()
- Returns:
- the proxy host
-
setPort
public void setPort(int port)
- Parameters:
port- the proxy port. Defaults to 80 if not set
-
getPort
public int getPort()
- Returns:
- the proxy port or 80 if not set
-
setUser
public void setUser(String user)
- Parameters:
user- the user for authenticating proxies
-
getUser
public String getUser()
- Returns:
- the user for authenticating proxies
-
setPassword
public void setPassword(String password)
- Parameters:
password- the password for authenticating proxies
-
getPassword
public String getPassword()
- Returns:
- the password for authenticating proxies
-
setExcludeHosts
public void setExcludeHosts(String proxyExcludeHosts)
List of hosts which should be connected too directly and not through the proxy server. The value can be a list of hosts, each seperated by a |, and in addition a wildcard character (*) can be used for matching. For example: -Dhttp.nonProxyHosts="*.foo.com|localhost".- Parameters:
proxyExcludeHosts- list of hosts that do not go through the proxy
-
getExcludeHosts
public String getExcludeHosts()
- Returns:
- the list of hosts which should be connected too directly and not through the proxy server
- See Also:
setExcludeHosts(String)
-
configure
public Map<String,String> configure()
Set the Java system properties related to proxies.- Returns:
- Previous proxy properties, to be used when
clear(java.util.Map)is called.
-
clear
public void clear(Map<String,String> previousProperties)
Clear all proxy settings.- Parameters:
previousProperties- Previous proxy properties, as returned byconfigure().
-
-