|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.opensha.nshmp.util.AppConfigurer
public class AppConfigurer
Description: Class used to configure the application to run on the
client's machine. All configuration options are set in a config file
called NSHMP_CONFIG in the home directory of the Java installation
on the user's machine. This directory is generally write protected
and thus one must be an administrator in order to set propertie(s)
to be consistent. This prevents the average user from inputting
bad settings or otherwise messing up their machine. Also, it is
one of few (and the least invasive of those) directories that is known
to exist and can be quickly and easily found from within the JRE.
Initially this class only sets and reads proxy settings for users that
require such. This can be expanded/subclassed to fully configure the
application.
TODO: Allow further customization through the configurations.
| Field Summary | |
|---|---|
static String |
JAVA_HOME
Deprecated. |
static String |
SLASH
Deprecated. |
| Constructor Summary | |
|---|---|
AppConfigurer()
Deprecated. |
|
| Method Summary | |
|---|---|
static void |
saveConfig(String key,
String value)
Deprecated. Saves the config property key with the value. |
static void |
saveProxySettings(String proxyHost,
String proxyPort)
Deprecated. Saves the proxyHost and proxyPort configuration values to the proxy_host and proxy_port configuration keys respectively. |
static void |
setProxyConfig(boolean save)
Deprecated. Attempts to read proxy settings from a config file. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String JAVA_HOME
public static final String SLASH
| Constructor Detail |
|---|
public AppConfigurer()
| Method Detail |
|---|
public static void setProxyConfig(boolean save)
save - if true, then the configuration settings are saved for
future use. If false then not saved.
public static void saveConfig(String key,
String value)
key - The name of the configuration key to be savedvalue - The value to assign to the key
public static void saveProxySettings(String proxyHost,
String proxyPort)
proxyHost - The name of the proxy host to useproxyPort - A string value representing the port number to use
with the corresponding proxyHost
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||