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(User user)
Get the login number for the specific user
|
int |
getCurrentUserLoginNumber(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,
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.
|
public static final String LOGIN_NUMBER
public void setObserver(StatisticsObserver observer)
setObserver
in interface ServerFtpStatistics
public void setFileObserver(FileObserver observer)
setFileObserver
in interface ServerFtpStatistics
public Date getStartTime()
getStartTime
in interface FtpStatistics
Date
when the server startedpublic 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
user
- The User
for which to retrieve the number of loginspublic int getCurrentUserLoginNumber(User user, InetAddress ipAddress)
getCurrentUserLoginNumber
in interface FtpStatistics
user
- login user accountipAddress
- the ip address of the remote userpublic 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 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
Copyright © 2003–2016 The Apache Software Foundation. All rights reserved.