public final class SeverityLevelCounter extends Object implements AuditListener
AuditEvents
of a given severity have been generated.Constructor and Description |
---|
SeverityLevelCounter(SeverityLevel level)
Creates a new counter.
|
Modifier and Type | Method and Description |
---|---|
void |
addError(AuditEvent event)
Notify that an audit error was discovered on a specific file.
|
void |
addException(AuditEvent event,
Throwable throwable)
Notify that an exception happened while performing audit.
|
void |
auditFinished(AuditEvent event)
Notify that the audit is finished.
|
void |
auditStarted(AuditEvent event)
Notify that the audit is about to start.
|
void |
fileFinished(AuditEvent event)
Notify that audit is finished on a specific file.
|
void |
fileStarted(AuditEvent event)
Notify that audit is about to start on a specific file.
|
int |
getCount()
Returns the number of counted events since audit started.
|
public SeverityLevelCounter(SeverityLevel level)
level
- the severity level events need to have, must be non-null.public void addError(AuditEvent event)
AuditListener
addError
in interface AuditListener
event
- the event detailspublic void addException(AuditEvent event, Throwable throwable)
AuditListener
addException
in interface AuditListener
event
- the event detailsthrowable
- details of the exceptionpublic void auditStarted(AuditEvent event)
AuditListener
auditStarted
in interface AuditListener
event
- the event detailspublic void fileStarted(AuditEvent event)
AuditListener
fileStarted
in interface AuditListener
event
- the event detailspublic void auditFinished(AuditEvent event)
AuditListener
auditFinished
in interface AuditListener
event
- the event detailspublic void fileFinished(AuditEvent event)
AuditListener
fileFinished
in interface AuditListener
event
- the event detailspublic int getCount()
Copyright © 2001–2018. All rights reserved.