ptConfig
class
class ptConfig {
ptConfig() {
hosts = new List<ptHost>();
servername="ptWebServer";
logPath="/var/log/ptws";
}
/*
* Server's name
*/
String servername;
/*
* Individual host configurations
*/
List<ptHost> hosts;
/*
* Where to save log files
*/
String logPath;
Map toJson() {
Map ret = new Map();
ret['servername']=servername;
ret['hosts']=hosts;
return ret;
}
}
Constructors
new ptConfig() #
Creates a new Object instance.
Object instances have no meaningful state, and are only useful
through their identity. An Object instance is equal to itself
only.
ptConfig() {
hosts = new List<ptHost>();
servername="ptWebServer";
logPath="/var/log/ptws";
}
Methods
Map toJson() #
Map toJson() {
Map ret = new Map();
ret['servername']=servername;
ret['hosts']=hosts;
return ret;
}