public class ClientDriver extends CommonDriver
This driver performs a single logon to the server, invokes the application class and exits, when the latter is done.
Configuration file can be plain (unencrypted) XML file or encrypted XML. If no password is given with the command line, the file is assumed to be plain XML.
Zero, one or two configuration files can be given as parameters along with their respective passwords. If not specified, it will default to "standard_client.xml" in the current directory.
The two file approach is recommended as it allows for a natural way of separating common or related configuration information (for all users or a group of users, normally supplied in the first file), from the user-specific configuration information (usually supplied in the second file). By merely specifying a different second file, another subject can use the application while sharing the first configuration file.
All entries in the bootstrap configuration can be overridden by a command line parameter using the "category:group:key=value" syntax (see below).
The full syntax of the command line is:
java ClientDriver [-?]
[config1]
[-p config1_file_password]
[config2]
[-p config2_file_password]
[-d initial_debuglevel]
[[[category:]group:]key=value]...
where arguments can be specified in any order. The first password specified will be used with the first config file specified and likewise with the second password and config file respectively.
'-?' requests syntax help and exits.
Password can be given with the command line or entered interactively. One special value can be used: "?" (which causes an interactive password prompt to be displayed).
Arguments in the form "category:group:key=value" are bootstrap configuration overrides. They may be used to add or change values of the configuration keys in the specified category and group. A short form of override (one that omits the category and group) is allowed after a long form override and refers to the most recently specified category and group.
defCfg, helptxt, maxCfg
Constructor and Description |
---|
ClientDriver() |
Modifier and Type | Method and Description |
---|---|
protected void |
checkConfig(BootstrapConfig bc)
Allows a subclass to check if the given configuration matches any
required values.
|
static void |
main(java.lang.String[] args)
The command line entry point.
|
private static void |
setClientLog(java.lang.String logName)
Redirect STDERR to the given file.
|
static void |
setClientLog(java.lang.String[] args)
For web, batch and broker clients redirect the log messages to a file.
|
protected void |
start(BootstrapConfig config)
Runs the primary application using the preprocessed configuration and
target object.
|
process, processArguments, processOverrides, processPassword, syntax, testFollowing
protected void checkConfig(BootstrapConfig bc)
checkConfig
in class CommonDriver
bc
- The configuration to be checked.protected void start(BootstrapConfig config) throws java.lang.Exception
start
in class CommonDriver
config
- The configuration to use.java.lang.Exception
public static void setClientLog(java.lang.String[] args)
args
- Process command line arguments.private static void setClientLog(java.lang.String logName)
logName
- Log file namepublic static void main(java.lang.String[] args)
args
- The array of command-line parameters.