info.aduna.app.net
Class ProxySettings

java.lang.Object
  extended by info.aduna.app.net.ProxySettings
All Implemented Interfaces:
Configuration

public class ProxySettings
extends Object
implements Configuration

Utility class for handling proxy connection settings.


Field Summary
static String PROXY_SETTINGS_FILENAME
           
 
Fields inherited from interface info.aduna.app.config.Configuration
CONFIG_DIR
 
Constructor Summary
ProxySettings(File applicationDataDir)
           
 
Method Summary
 void destroy()
          Clean up configuration resources.
 String getFtpProxyHost()
           
 String getFtpProxyPort()
           
 String getHttpProxyHost()
           
 String getHttpProxyPort()
           
 String getHttpsProxyHost()
           
 String getHttpsProxyPort()
           
 String getNonProxyHostsStarting()
          Get the semicolon-separated list of hostnames starting with given strings, that do not use the proxy settings.
 boolean getProxiesEnabled()
           
 String getSocksProxyHost()
           
 String getSocksProxyPort()
           
 void init()
          Initialize the configuration settings.
 void load()
          (Re-)loads the proxy system properties.
 void save()
          Saves the currently known settings.
 void setFtpProxyHost(String ftpProxyHost)
           
 void setFtpProxyPort(String ftpProxyPort)
           
 void setHttpProxyHost(String httpProxyHost)
           
 void setHttpProxyPort(String httpProxyPort)
           
 void setHttpsProxyHost(String httpsProxyHost)
           
 void setHttpsProxyPort(String httpsProxyPort)
           
 void setNonProxyHostsStarting(String nonProxyHostsStarting)
          Set the semicolon separated list of hostnames starting with given strings, that do not use the proxy settings.
 void setProperty(String key, String val)
           
 void setProxiesEnabled(boolean proxiesEnabled)
           
 void setSocksProxyHost(String socksProxyHost)
           
 void setSocksProxyPort(String socksProxyPort)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROXY_SETTINGS_FILENAME

public static final String PROXY_SETTINGS_FILENAME
See Also:
Constant Field Values
Constructor Detail

ProxySettings

public ProxySettings(File applicationDataDir)
              throws IOException
Throws:
IOException
Method Detail

setProperty

public void setProperty(String key,
                        String val)

getProxiesEnabled

public boolean getProxiesEnabled()

setProxiesEnabled

public void setProxiesEnabled(boolean proxiesEnabled)

getHttpProxyHost

public String getHttpProxyHost()

setHttpProxyHost

public void setHttpProxyHost(String httpProxyHost)

getHttpProxyPort

public String getHttpProxyPort()

setHttpProxyPort

public void setHttpProxyPort(String httpProxyPort)

getHttpsProxyHost

public String getHttpsProxyHost()

setHttpsProxyHost

public void setHttpsProxyHost(String httpsProxyHost)

getHttpsProxyPort

public String getHttpsProxyPort()

setHttpsProxyPort

public void setHttpsProxyPort(String httpsProxyPort)

getFtpProxyHost

public String getFtpProxyHost()

setFtpProxyHost

public void setFtpProxyHost(String ftpProxyHost)

getFtpProxyPort

public String getFtpProxyPort()

setFtpProxyPort

public void setFtpProxyPort(String ftpProxyPort)

getSocksProxyHost

public String getSocksProxyHost()

setSocksProxyHost

public void setSocksProxyHost(String socksProxyHost)

getSocksProxyPort

public String getSocksProxyPort()

setSocksProxyPort

public void setSocksProxyPort(String socksProxyPort)

getNonProxyHostsStarting

public String getNonProxyHostsStarting()
Get the semicolon-separated list of hostnames starting with given strings, that do not use the proxy settings.


setNonProxyHostsStarting

public void setNonProxyHostsStarting(String nonProxyHostsStarting)
Set the semicolon separated list of hostnames starting with given strings, that do not use the proxy settings.


load

public void load()
          throws IOException
(Re-)loads the proxy system properties.

Specified by:
load in interface Configuration
Throws:
IOException - if the configuration settings could not be loaded due to an I/O problem.

save

public void save()
          throws IOException
Saves the currently known settings.

Specified by:
save in interface Configuration
Throws:
IOException - if the configuration settings could not be saved due to an I/O problem.

destroy

public void destroy()
             throws IOException
Description copied from interface: Configuration
Clean up configuration resources.

Specified by:
destroy in interface Configuration
Throws:
IOException - if one or more resources could not be cleaned up. Implementations should attempt to clean up as many resources as possible before returning or throwing an exception.

init

public void init()
          throws IOException
Description copied from interface: Configuration
Initialize the configuration settings.

Specified by:
init in interface Configuration
Throws:
IOException - if the configuration settings could not be initialized because of an I/O problem.


Copyright © 1997-2008 Aduna. All Rights Reserved.