Class GeneralStatistics
- java.lang.Object
-
- com.jscape.inet.mft.audit.reporting.metricses.GeneralStatistics
-
- All Implemented Interfaces:
Metrics<GeneralStatistics.Visitor>,com.jscape.util.Copyable<Metrics>,com.jscape.util.Visitable<GeneralStatistics.Visitor>
public class GeneralStatistics extends java.lang.Object implements Metrics<GeneralStatistics.Visitor>
General domain statistics.- Author:
- Roman Sheshunov
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceGeneralStatistics.Visitor
-
Constructor Summary
Constructors Constructor Description GeneralStatistics()Creates a new metrics instance.GeneralStatistics(TotalSessions totalSessions, TotalUploads totalUploads, TotalUniqueIps uniqueIps, TotalDownloads totalDownloads, TotalBytesUploaded totalBytesUploaded, TotalBytesDownloaded totalBytesDownloaded, TotalFileAttachmentsSent totalAttachmentsSent, TotalFileAttachmentsReceived totalAttachmentsReceived, TotalFileAttachmentBytesSent totalBytesAttachmentSent, TotalFileAttachmentBytesReceived totalBytesAttachmentReceived, TotalExternalUploads totalExternalUploads, TotalExternalDownloads totalExternalDownloads, TotalExternalBytesUploads totalExternalBytesUploaded, TotalExternalBytesDownloaded totalExternalBytesDownloaded)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Objectaccept(GeneralStatistics.Visitor visitor)Backwards dispatching entry point.GeneralStatisticscopy()booleanequals(java.lang.Object o)longgetTotalAttachmentsReceived()Returns total attachments received count.longgetTotalAttachmentsSent()Returns total attachments sent count.longgetTotalBytesAttachmentReceived()Returns total bytes attachment received.longgetTotalBytesAttachmentSent()Returns total bytes attachment sent.longgetTotalBytesDownloaded()Returns total bytes downloaded.longgetTotalBytesUploaded()Returns total bytes uploaded.longgetTotalDownloads()Returns total downloads count.longgetTotalExternalBytesDownloaded()Returns total external bytes downloaded.longgetTotalExternalBytesUploaded()Returns total external bytes uploaded.longgetTotalExternalDownloads()Returns total external downloads count.longgetTotalExternalUploads()Returns total external uploads count.longgetTotalSessions()Returns total sessions count.longgetTotalUniqueIps()Returns total unique IPs count.longgetTotalUploads()Returns total uploads count.java.util.SetgetUniqueIps()Returns unique IPs set.voidreset()Resets metrics data.voidsetTotalAttachmentsReceived(long value)Sets total attachments received count.voidsetTotalAttachmentsSent(long value)Sets total attachments sent count.voidsetTotalBytesAttachmentReceived(long value)Sets total bytes attachment received.voidsetTotalBytesAttachmentSent(long value)Sets total bytes attachment sent.voidsetTotalBytesDownloaded(long value)Sets total bytes downloaded.voidsetTotalBytesUploaded(long value)Sets total bytes uploaded.voidsetTotalDownloads(long value)Sets total downloads count.voidsetTotalExternalBytesDownloaded(long value)Sets total external bytes downloaded.voidsetTotalExternalBytesUploaded(long value)Sets total external bytes uploaded.voidsetTotalExternalDownloads(long value)Sets total external downloads count.voidsetTotalExternalUploads(long value)Sets total external uploads count.voidsetTotalSessions(long value)Sets total sessions count.voidsetTotalUniqueIps(int value)voidsetTotalUploads(long value)Sets total uploads count.voidsetUniqueIps(java.util.Set uniqueIps)Sets unique IPs set.java.lang.StringtoString()voidupdate(Report report, com.jscape.inet.mft.LogRecord record)Updates metrics with log record.
-
-
-
Constructor Detail
-
GeneralStatistics
public GeneralStatistics()
Creates a new metrics instance.
-
GeneralStatistics
public GeneralStatistics(TotalSessions totalSessions, TotalUploads totalUploads, TotalUniqueIps uniqueIps, TotalDownloads totalDownloads, TotalBytesUploaded totalBytesUploaded, TotalBytesDownloaded totalBytesDownloaded, TotalFileAttachmentsSent totalAttachmentsSent, TotalFileAttachmentsReceived totalAttachmentsReceived, TotalFileAttachmentBytesSent totalBytesAttachmentSent, TotalFileAttachmentBytesReceived totalBytesAttachmentReceived, TotalExternalUploads totalExternalUploads, TotalExternalDownloads totalExternalDownloads, TotalExternalBytesUploads totalExternalBytesUploaded, TotalExternalBytesDownloaded totalExternalBytesDownloaded)
-
-
Method Detail
-
update
public void update(Report report, com.jscape.inet.mft.LogRecord record)
Description copied from interface:MetricsUpdates metrics with log record.- Specified by:
updatein interfaceMetrics<GeneralStatistics.Visitor>- Parameters:
report- report instancerecord- log record
-
reset
public void reset()
Description copied from interface:MetricsResets metrics data.- Specified by:
resetin interfaceMetrics<GeneralStatistics.Visitor>
-
copy
public GeneralStatistics copy()
- Specified by:
copyin interfacecom.jscape.util.Copyable<Metrics>
-
accept
public java.lang.Object accept(GeneralStatistics.Visitor visitor) throws com.jscape.util.Visitable.VisitorException
Description copied from interface:com.jscape.util.VisitableBackwards dispatching entry point.- Specified by:
acceptin interfacecom.jscape.util.Visitable<GeneralStatistics.Visitor>- Parameters:
visitor- a visitor instance- Returns:
- a visit result if any
- Throws:
com.jscape.util.Visitable.VisitorException- if an error occurs
-
getTotalSessions
public long getTotalSessions()
Returns total sessions count.- Returns:
- total sessions count
-
setTotalSessions
public void setTotalSessions(long value)
Sets total sessions count.- Parameters:
value- total sessions count
-
getTotalUniqueIps
public long getTotalUniqueIps()
Returns total unique IPs count.- Returns:
- total unique IPs count
-
setTotalUniqueIps
public void setTotalUniqueIps(int value)
-
getUniqueIps
public java.util.Set getUniqueIps()
Returns unique IPs set.- Returns:
- unique IPs set
-
setUniqueIps
public void setUniqueIps(java.util.Set uniqueIps)
Sets unique IPs set.- Parameters:
uniqueIps- unique IPs set
-
getTotalUploads
public long getTotalUploads()
Returns total uploads count.- Returns:
- total uploads count
-
setTotalUploads
public void setTotalUploads(long value)
Sets total uploads count.- Parameters:
value- total uploads count
-
getTotalDownloads
public long getTotalDownloads()
Returns total downloads count.- Returns:
- total downloads count
-
setTotalDownloads
public void setTotalDownloads(long value)
Sets total downloads count.- Parameters:
value- total downloads count
-
getTotalBytesUploaded
public long getTotalBytesUploaded()
Returns total bytes uploaded.- Returns:
- total bytes uploaded
-
setTotalBytesUploaded
public void setTotalBytesUploaded(long value)
Sets total bytes uploaded.- Parameters:
value- total bytes uploaded
-
getTotalBytesDownloaded
public long getTotalBytesDownloaded()
Returns total bytes downloaded.- Returns:
- total bytes downloaded
-
setTotalBytesDownloaded
public void setTotalBytesDownloaded(long value)
Sets total bytes downloaded.- Parameters:
value- total bytes downloaded
-
getTotalExternalUploads
public long getTotalExternalUploads()
Returns total external uploads count.- Returns:
- total external uploads count.
-
setTotalExternalUploads
public void setTotalExternalUploads(long value)
Sets total external uploads count.- Parameters:
value- total external uploads count.
-
getTotalExternalDownloads
public long getTotalExternalDownloads()
Returns total external downloads count.- Returns:
- total external downloads count.
-
setTotalExternalDownloads
public void setTotalExternalDownloads(long value)
Sets total external downloads count.- Parameters:
value- total external downloads count.
-
getTotalExternalBytesUploaded
public long getTotalExternalBytesUploaded()
Returns total external bytes uploaded.- Returns:
- total external bytes uploaded
-
setTotalExternalBytesUploaded
public void setTotalExternalBytesUploaded(long value)
Sets total external bytes uploaded.- Parameters:
value- total external bytes uploaded
-
getTotalExternalBytesDownloaded
public long getTotalExternalBytesDownloaded()
Returns total external bytes downloaded.- Returns:
- total external bytes downloaded
-
setTotalExternalBytesDownloaded
public void setTotalExternalBytesDownloaded(long value)
Sets total external bytes downloaded.- Parameters:
value- total external bytes downloaded
-
getTotalAttachmentsSent
public long getTotalAttachmentsSent()
Returns total attachments sent count.- Returns:
- total attachments sent count.
-
setTotalAttachmentsSent
public void setTotalAttachmentsSent(long value)
Sets total attachments sent count.- Parameters:
value- total attachments sent count.
-
getTotalAttachmentsReceived
public long getTotalAttachmentsReceived()
Returns total attachments received count.- Returns:
- total attachments received count.
-
setTotalAttachmentsReceived
public void setTotalAttachmentsReceived(long value)
Sets total attachments received count.- Parameters:
value- total attachments received count.
-
getTotalBytesAttachmentSent
public long getTotalBytesAttachmentSent()
Returns total bytes attachment sent.- Returns:
- total bytes attachment sent.
-
setTotalBytesAttachmentSent
public void setTotalBytesAttachmentSent(long value)
Sets total bytes attachment sent.- Parameters:
value- total bytes attachment sent.
-
getTotalBytesAttachmentReceived
public long getTotalBytesAttachmentReceived()
Returns total bytes attachment received.- Returns:
- total bytes attachment received.
-
setTotalBytesAttachmentReceived
public void setTotalBytesAttachmentReceived(long value)
Sets total bytes attachment received.- Parameters:
value- total bytes attachment received.
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-