public class ClientConfig
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CONFIG_ARG_PREFIX |
Constructor and Description |
---|
ClientConfig(java.lang.String[] args)
Defaults to looking in the working directory for a config.properties file.
|
Modifier and Type | Method and Description |
---|---|
Connection |
createConnection()
Creates a connection object based on the baseServerURL, username, and password config properties.
|
java.lang.String |
getProperty(java.lang.String name)
Gets a property of the given name.
|
java.lang.String |
getProperty(java.lang.String name,
java.lang.String defaultValue) |
public static final java.lang.String CONFIG_ARG_PREFIX
public ClientConfig(java.lang.String[] args) throws java.io.IOException
args
- command-line arguments to the programjava.io.IOException
- if there is an IO problem reading the config.properties filepublic java.lang.String getProperty(java.lang.String name, java.lang.String defaultValue)
public java.lang.String getProperty(java.lang.String name)
name
- the name of the propertypublic Connection createConnection()