* Get statistical login variable value.
*/
private static String getStatisticalLoginVariableValue(
FtpIoSession session, FtpServerContext context, String varName) {
String varVal = null;
FtpStatistics stat = context.getFtpStatistics();
// total login number
if (varName.equals(STAT_LOGIN_TOTAL)) {
varVal = String.valueOf(stat.getTotalLoginNumber());
}
// current login number
else if (varName.equals(STAT_LOGIN_CURR)) {
varVal = String.valueOf(stat.getCurrentLoginNumber());
}
// total anonymous login number
else if (varName.equals(STAT_LOGIN_ANON_TOTAL)) {
varVal = String.valueOf(stat.getTotalAnonymousLoginNumber());
}
// current anonymous login number
else if (varName.equals(STAT_LOGIN_ANON_CURR)) {
varVal = String.valueOf(stat.getCurrentAnonymousLoginNumber());
}
return varVal;
}