|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object jp.go.aist.rtm.RTC.ManagerConfig
class ManagerConfig
Modify Manager's configuration.
This class receives the command line arguments and will be instantiated. Set property information of Manager with the configuration file specified by the command line argument or the environment variable etc. The priorities of each configuration are as follows:
Field Summary | |
---|---|
static java.lang.String |
CONFIG_FILE_ENV
The environment variable to distinguish the default configuration file path |
static java.lang.String[] |
CONFIG_FILE_PATH
The default configuration file path for manager |
protected Properties |
m_argprop
configuration properties from arguments |
protected java.lang.String |
m_configFile
Manager's configuration file path |
protected boolean |
m_isMaster
Manager master flag true:master,false:slave |
Constructor Summary | |
---|---|
ManagerConfig()
Constructor |
|
ManagerConfig(java.lang.String[] args)
Constructor |
Method Summary | |
---|---|
void |
configure(Properties properties)
Specify the configuration information to the Property |
protected boolean |
fileExist(java.lang.String filePath)
Check the file existence |
protected boolean |
findConfigFile()
Find the configuration file |
void |
init(java.lang.String[] args)
Initialization |
protected void |
parseArgs(java.lang.String[] args)
Parse the command arguments |
protected void |
setSystemInformation(Properties properties)
Set system information |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String[] CONFIG_FILE_PATH
public static final java.lang.String CONFIG_FILE_ENV
protected java.lang.String m_configFile
protected boolean m_isMaster
protected Properties m_argprop
Constructor Detail |
---|
public ManagerConfig()
public ManagerConfig(java.lang.String[] args) throws java.lang.Exception
Initialize configuration information by given arguments.
args
-
The command line arguments
java.lang.Exception
Method Detail |
---|
public void init(java.lang.String[] args) throws java.lang.Exception
Initialize with command line options. The following command options are available.
args
-
The command line arguments
java.lang.Exception
public void configure(Properties properties) throws java.io.FileNotFoundException, java.io.IOException
Configure to the properties specified by Manager's configuration
properties
-
The target properties to configure
java.io.IOException
java.io.FileNotFoundException
protected void parseArgs(java.lang.String[] args) throws java.lang.IllegalArgumentException
args
-
The command line arguments
java.lang.IllegalArgumentException
protected boolean findConfigFile()
Find the configuration file and configure it. Confirm the file existence when the configuration file has already configured. The configuration file is retrieved in the following order.
protected void setSystemInformation(Properties properties)
Get the following system info. and set them to Manager's properties.
properties
-
Properties to set system informationprotected boolean fileExist(java.lang.String filePath)
Confirm whether the specified file exists
filePath
-
The target confirmation file
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |