|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.ftpserver.FtpStatisticsImpl
public class FtpStatisticsImpl
This is FTP statistics implementation. TODO revisit concurrency, right now we're a bit zealous with both Atomix* counters and synchronization
Field Summary | |
---|---|
static java.lang.String |
LOGIN_NUMBER
|
Constructor Summary | |
---|---|
FtpStatisticsImpl()
|
Method Summary | |
---|---|
int |
getCurrentAnonymousLoginNumber()
Get current number of anonymous logins. |
int |
getCurrentConnectionNumber()
Get current number of connections. |
int |
getCurrentLoginNumber()
Get current number of logins. |
int |
getCurrentUserLoginNumber(User user)
Get the login number for the specific user |
int |
getCurrentUserLoginNumber(User user,
java.net.InetAddress ipAddress)
Get the login number for the specific user from the ipAddress |
java.util.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,
FileObject file)
Increment delete count. |
void |
setDownload(FtpIoSession session,
FileObject 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,
FileObject file)
Increment make directory count. |
void |
setObserver(StatisticsObserver observer)
Set the observer. |
void |
setOpenConnection(FtpIoSession session)
Increment open connection count. |
void |
setRmdir(FtpIoSession session,
FileObject file)
Increment remove directory count. |
void |
setUpload(FtpIoSession session,
FileObject file,
long size)
Increment upload count. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String LOGIN_NUMBER
Constructor Detail |
---|
public FtpStatisticsImpl()
Method Detail |
---|
public void setObserver(StatisticsObserver observer)
setObserver
in interface ServerFtpStatistics
public void setFileObserver(FileObserver observer)
setFileObserver
in interface ServerFtpStatistics
public java.util.Date getStartTime()
getStartTime
in interface FtpStatistics
public int getTotalUploadNumber()
getTotalUploadNumber
in interface FtpStatistics
public int getTotalDownloadNumber()
getTotalDownloadNumber
in interface FtpStatistics
public int getTotalDeleteNumber()
getTotalDeleteNumber
in interface FtpStatistics
public long getTotalUploadSize()
getTotalUploadSize
in interface FtpStatistics
public long getTotalDownloadSize()
getTotalDownloadSize
in interface FtpStatistics
public int getTotalDirectoryCreated()
getTotalDirectoryCreated
in interface FtpStatistics
public int getTotalDirectoryRemoved()
getTotalDirectoryRemoved
in interface FtpStatistics
public int getTotalConnectionNumber()
getTotalConnectionNumber
in interface FtpStatistics
public int getCurrentConnectionNumber()
getCurrentConnectionNumber
in interface FtpStatistics
public int getTotalLoginNumber()
getTotalLoginNumber
in interface FtpStatistics
public int getTotalFailedLoginNumber()
getTotalFailedLoginNumber
in interface FtpStatistics
public int getCurrentLoginNumber()
getCurrentLoginNumber
in interface FtpStatistics
public int getTotalAnonymousLoginNumber()
getTotalAnonymousLoginNumber
in interface FtpStatistics
public int getCurrentAnonymousLoginNumber()
getCurrentAnonymousLoginNumber
in interface FtpStatistics
public int getCurrentUserLoginNumber(User user)
getCurrentUserLoginNumber
in interface FtpStatistics
public int getCurrentUserLoginNumber(User user, java.net.InetAddress ipAddress)
getCurrentUserLoginNumber
in interface FtpStatistics
user
- login user accountipAddress
- the ip address of the remote userpublic void setUpload(FtpIoSession session, FileObject file, long size)
setUpload
in interface ServerFtpStatistics
public void setDownload(FtpIoSession session, FileObject file, long size)
setDownload
in interface ServerFtpStatistics
public void setDelete(FtpIoSession session, FileObject file)
setDelete
in interface ServerFtpStatistics
public void setMkdir(FtpIoSession session, FileObject file)
setMkdir
in interface ServerFtpStatistics
public void setRmdir(FtpIoSession session, FileObject file)
setRmdir
in interface ServerFtpStatistics
public void setOpenConnection(FtpIoSession session)
setOpenConnection
in interface ServerFtpStatistics
public void setCloseConnection(FtpIoSession session)
setCloseConnection
in interface ServerFtpStatistics
public void setLogin(FtpIoSession session)
setLogin
in interface ServerFtpStatistics
public void setLoginFail(FtpIoSession session)
setLoginFail
in interface ServerFtpStatistics
public void setLogout(FtpIoSession session)
setLogout
in interface ServerFtpStatistics
public void resetStatisticsCounters()
resetStatisticsCounters
in interface ServerFtpStatistics
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |