shared
Class OptionServer
java.lang.Object
|
+--shared.OptionServer
- public class OptionServer
- extends java.lang.Object
OptionServer serves as an interface between the option mechanism and the
physical storage for the options themselves. Specifically, OptionServer allows
options to be retrieved from either the environment, the command line, or any
of a number of specially formatted option (configuration) files.
|
Method Summary |
boolean |
get_option(java.lang.String optName,
java.lang.String[] optVal)
The main function in this class, this function gets the value of an option given
its name (optName). |
void |
set_option(java.lang.String optName,
java.lang.String optVal)
Sets an option given a textual name and value. |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
OptionServer
public OptionServer()
- Constructor. The default option state has no special options and will search
the environment for options before giving up.
set_option
public void set_option(java.lang.String optName,
java.lang.String optVal)
- Sets an option given a textual name and value. If the option was already set,
this replaces the old value.
- Parameters:
optName - The option name.optVal - The option value.
get_option
public boolean get_option(java.lang.String optName,
java.lang.String[] optVal)
- The main function in this class, this function gets the value of an option given
its name (optName). The value is placed in the string optVal. The function
returns TRUE if the option is defined, either within the options table or (if
useEnv is set) in the environment. If the option is undefined, the function
returns FALSE.
- Parameters:
optName - The option name.optVal - The value assigned to this option.- Returns:
- TRUE if the option is defined, FALSE otherwise.