|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.ftpserver.impl.DefaultFtpStatistics
public class DefaultFtpStatistics
Internal class, do not use directly. This is FTP statistics implementation. TODO revisit concurrency, right now we're a bit over zealous with both Atomic* counters and synchronization
| Field Summary | |
|---|---|
static java.lang.String |
LOGIN_NUMBER
|
| Constructor Summary | |
|---|---|
DefaultFtpStatistics()
|
|
| 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,
FtpFile file)
Increment delete count. |
void |
setDownload(FtpIoSession session,
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,
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,
FtpFile file)
Increment remove directory count. |
void |
setUpload(FtpIoSession session,
FtpFile 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 DefaultFtpStatistics()
| Method Detail |
|---|
public void setObserver(StatisticsObserver observer)
setObserver in interface ServerFtpStatisticspublic void setFileObserver(FileObserver observer)
setFileObserver in interface ServerFtpStatisticspublic java.util.Date getStartTime()
getStartTime in interface FtpStatisticspublic int getTotalUploadNumber()
getTotalUploadNumber in interface FtpStatisticspublic int getTotalDownloadNumber()
getTotalDownloadNumber in interface FtpStatisticspublic int getTotalDeleteNumber()
getTotalDeleteNumber in interface FtpStatisticspublic long getTotalUploadSize()
getTotalUploadSize in interface FtpStatisticspublic long getTotalDownloadSize()
getTotalDownloadSize in interface FtpStatisticspublic int getTotalDirectoryCreated()
getTotalDirectoryCreated in interface FtpStatisticspublic int getTotalDirectoryRemoved()
getTotalDirectoryRemoved in interface FtpStatisticspublic int getTotalConnectionNumber()
getTotalConnectionNumber in interface FtpStatisticspublic int getCurrentConnectionNumber()
getCurrentConnectionNumber in interface FtpStatisticspublic int getTotalLoginNumber()
getTotalLoginNumber in interface FtpStatisticspublic int getTotalFailedLoginNumber()
getTotalFailedLoginNumber in interface FtpStatisticspublic int getCurrentLoginNumber()
getCurrentLoginNumber in interface FtpStatisticspublic int getTotalAnonymousLoginNumber()
getTotalAnonymousLoginNumber in interface FtpStatisticspublic int getCurrentAnonymousLoginNumber()
getCurrentAnonymousLoginNumber in interface FtpStatisticspublic int getCurrentUserLoginNumber(User user)
getCurrentUserLoginNumber in interface FtpStatistics
public int getCurrentUserLoginNumber(User user,
java.net.InetAddress ipAddress)
getCurrentUserLoginNumber in interface FtpStatisticsuser - login user accountipAddress - the ip address of the remote user
public void setUpload(FtpIoSession session,
FtpFile file,
long size)
setUpload in interface ServerFtpStatistics
public void setDownload(FtpIoSession session,
FtpFile file,
long size)
setDownload in interface ServerFtpStatistics
public void setDelete(FtpIoSession session,
FtpFile file)
setDelete in interface ServerFtpStatistics
public void setMkdir(FtpIoSession session,
FtpFile file)
setMkdir in interface ServerFtpStatistics
public void setRmdir(FtpIoSession session,
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 ServerFtpStatistics
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||