Initializes the stats from the given virtual server
startTime = System.currentTimeMillis();
// ID
idStats = new StringStatisticImpl(
vs.getID(),
"Id",
"String",
"Virtual Server ID",
startTime,
startTime);
// Mode
modeStats = new StringStatisticImpl(
vs.isActive() ? "active" : "unknown",
"Mode",
"unknown/active",
"Virtual Server mode",
startTime,
startTime);
// Hosts
String hosts = null;
String[] aliases = vs.findAliases();
if (aliases != null) {
for (int i=0; i<aliases.length; i++) {
if (hosts == null) {
hosts = aliases[i];
} else {
hosts += ", " + aliases[i];
}
}
}
hostsStats = new StringStatisticImpl(
hosts,
"Hosts",
"String",
"The software virtual hostnames serviced by "
+ "this Virtual Server",
startTime,
startTime);
// Interfaces
interfacesStats = new StringStatisticImpl(
"0.0.0.0", // XXX FIX
"Interfaces",
"String",
"The interfaces for which this Virtual Server "
+ "has been configured",
startTime,
startTime);