Examples of FtpStatistics


Examples of org.apache.ftpserver.ftplet.FtpStatistics

     * 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;
    }
View Full Code Here

Examples of org.apache.ftpserver.ftplet.FtpStatistics

     */
    private static String getStatisticalVariableValue(FtpIoSession session,
            FtpServerContext context, String varName) {

        String varVal = null;
        FtpStatistics stat = context.getFtpStatistics();

        // server start time
        if (varName.equals(STAT_START_TIME)) {
            varVal = DateUtils.getISO8601Date(stat.getStartTime().getTime());
        }

        // connection statistical variables
        else if (varName.startsWith("stat.con")) {
            varVal = getStatisticalConnectionVariableValue(session, context,
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.