public class DefaultFtpStatistics extends Object implements ServerFtpStatistics
| Modifier and Type | Field and Description |
|---|---|
static String |
LOGIN_NUMBER |
| Constructor and Description |
|---|
DefaultFtpStatistics() |
| Modifier and Type | Method and Description |
|---|---|
int |
getCurrentAnonymousLoginNumber()
Get current number of anonymous logins.
|
int |
getCurrentConnectionNumber()
Get current number of connections.
|
int |
getCurrentLoginNumber()
Get current number of logins.
|
int |
getCurrentUserLoginNumber(org.apache.ftpserver.ftplet.User user)
Get the login number for the specific user
|
int |
getCurrentUserLoginNumber(org.apache.ftpserver.ftplet.User user,
InetAddress ipAddress)
Get the login number for the specific user from the ipAddress
|
Date |
getStartTime()
Get server start time.
|
int |
getTotalAnonymousLoginNumber()
Get total number of anonymous logins.
|
int |
getTotalConnectionNumber()
Get total number of connections.
|
int |
getTotalDeleteNumber()
Get number of files deleted.
|
int |
getTotalDirectoryCreated()
Get total directory created.
|
int |
getTotalDirectoryRemoved()
Get total directory removed.
|
int |
getTotalDownloadNumber()
Get number of files downloaded.
|
long |
getTotalDownloadSize()
Get total number of bytes downloaded.
|
int |
getTotalFailedLoginNumber()
Get total failed login number.
|
int |
getTotalLoginNumber()
Get total number of logins.
|
int |
getTotalUploadNumber()
Get number of files uploaded.
|
long |
getTotalUploadSize()
Get total number of bytes uploaded.
|
void |
resetStatisticsCounters()
Reset the cumulative counters.
|
void |
setCloseConnection(FtpIoSession session)
Decrement open connection count.
|
void |
setDelete(FtpIoSession session,
org.apache.ftpserver.ftplet.FtpFile file)
Increment delete count.
|
void |
setDownload(FtpIoSession session,
org.apache.ftpserver.ftplet.FtpFile file,
long size)
Increment download count.
|
void |
setFileObserver(FileObserver observer)
Set the file observer.
|
void |
setLogin(FtpIoSession session)
New login.
|
void |
setLoginFail(FtpIoSession session)
Increment failed login count.
|
void |
setLogout(FtpIoSession session)
User logout
|
void |
setMkdir(FtpIoSession session,
org.apache.ftpserver.ftplet.FtpFile file)
Increment make directory count.
|
void |
setObserver(StatisticsObserver observer)
Set the observer.
|
void |
setOpenConnection(FtpIoSession session)
Increment open connection count.
|
void |
setRmdir(FtpIoSession session,
org.apache.ftpserver.ftplet.FtpFile file)
Increment remove directory count.
|
void |
setUpload(FtpIoSession session,
org.apache.ftpserver.ftplet.FtpFile file,
long size)
Increment upload count.
|
public static final String LOGIN_NUMBER
public void setObserver(StatisticsObserver observer)
setObserver in interface ServerFtpStatisticspublic void setFileObserver(FileObserver observer)
setFileObserver in interface ServerFtpStatisticspublic Date getStartTime()
getStartTime in interface org.apache.ftpserver.ftplet.FtpStatisticspublic int getTotalUploadNumber()
getTotalUploadNumber in interface org.apache.ftpserver.ftplet.FtpStatisticspublic int getTotalDownloadNumber()
getTotalDownloadNumber in interface org.apache.ftpserver.ftplet.FtpStatisticspublic int getTotalDeleteNumber()
getTotalDeleteNumber in interface org.apache.ftpserver.ftplet.FtpStatisticspublic long getTotalUploadSize()
getTotalUploadSize in interface org.apache.ftpserver.ftplet.FtpStatisticspublic long getTotalDownloadSize()
getTotalDownloadSize in interface org.apache.ftpserver.ftplet.FtpStatisticspublic int getTotalDirectoryCreated()
getTotalDirectoryCreated in interface org.apache.ftpserver.ftplet.FtpStatisticspublic int getTotalDirectoryRemoved()
getTotalDirectoryRemoved in interface org.apache.ftpserver.ftplet.FtpStatisticspublic int getTotalConnectionNumber()
getTotalConnectionNumber in interface org.apache.ftpserver.ftplet.FtpStatisticspublic int getCurrentConnectionNumber()
getCurrentConnectionNumber in interface org.apache.ftpserver.ftplet.FtpStatisticspublic int getTotalLoginNumber()
getTotalLoginNumber in interface org.apache.ftpserver.ftplet.FtpStatisticspublic int getTotalFailedLoginNumber()
getTotalFailedLoginNumber in interface org.apache.ftpserver.ftplet.FtpStatisticspublic int getCurrentLoginNumber()
getCurrentLoginNumber in interface org.apache.ftpserver.ftplet.FtpStatisticspublic int getTotalAnonymousLoginNumber()
getTotalAnonymousLoginNumber in interface org.apache.ftpserver.ftplet.FtpStatisticspublic int getCurrentAnonymousLoginNumber()
getCurrentAnonymousLoginNumber in interface org.apache.ftpserver.ftplet.FtpStatisticspublic int getCurrentUserLoginNumber(org.apache.ftpserver.ftplet.User user)
getCurrentUserLoginNumber in interface org.apache.ftpserver.ftplet.FtpStatisticspublic int getCurrentUserLoginNumber(org.apache.ftpserver.ftplet.User user,
InetAddress ipAddress)
getCurrentUserLoginNumber in interface org.apache.ftpserver.ftplet.FtpStatisticsuser - login user accountipAddress - the ip address of the remote userpublic void setUpload(FtpIoSession session, org.apache.ftpserver.ftplet.FtpFile file, long size)
setUpload in interface ServerFtpStatisticspublic void setDownload(FtpIoSession session, org.apache.ftpserver.ftplet.FtpFile file, long size)
setDownload in interface ServerFtpStatisticspublic void setDelete(FtpIoSession session, org.apache.ftpserver.ftplet.FtpFile file)
setDelete in interface ServerFtpStatisticspublic void setMkdir(FtpIoSession session, org.apache.ftpserver.ftplet.FtpFile file)
setMkdir in interface ServerFtpStatisticspublic void setRmdir(FtpIoSession session, org.apache.ftpserver.ftplet.FtpFile file)
setRmdir in interface ServerFtpStatisticspublic void setOpenConnection(FtpIoSession session)
setOpenConnection in interface ServerFtpStatisticspublic void setCloseConnection(FtpIoSession session)
setCloseConnection in interface ServerFtpStatisticspublic void setLogin(FtpIoSession session)
setLogin in interface ServerFtpStatisticspublic void setLoginFail(FtpIoSession session)
setLoginFail in interface ServerFtpStatisticspublic void setLogout(FtpIoSession session)
setLogout in interface ServerFtpStatisticspublic void resetStatisticsCounters()
resetStatisticsCounters in interface ServerFtpStatisticsCopyright © 2003–2017 The Apache Software Foundation. All rights reserved.