Class FileAuditEvent
java.lang.Object
java.util.EventObject
org.snmp4j.agent.audit.FileAuditEvent
- All Implemented Interfaces:
Serializable
The
FileAuditEvent describes a file system operation that is about to be executed (or, for
FileAuditEvent.FileOperation.DELETE, has been executed) by the SNMP4J-Agent. It is passed to all
registered FileAuditListeners, which lets the listeners monitor (audit) and optionally
prevent (deny) read, write, create, and delete access to files.
This event and its FileAuditListener are the file system equivalent of the
TransportAuditEvent and
TransportAuditListener used for transport level auditing.
- Since:
- 3.12.0
- Version:
- 3.12.0
- Author:
- Frank Fock
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumTheFileOperationenumerates the file system operations that can be audited. -
Field Summary
Fields inherited from class EventObject
source -
Constructor Summary
ConstructorsConstructorDescriptionFileAuditEvent(Object source, FileAuditEvent.FileOperation operation, File file) Creates aFileAuditEvent.FileAuditEvent(Object source, FileAuditEvent.FileOperation operation, String file) Creates aFileAuditEvent. -
Method Summary
Methods inherited from class EventObject
getSource
-
Constructor Details
-
FileAuditEvent
Creates aFileAuditEvent.- Parameters:
source- the object that fired this event (i.e. the component that is about to access the file).operation- the auditedFileAuditEvent.FileOperation.file- theFilethe operation refers to.
-
FileAuditEvent
Creates aFileAuditEvent.- Parameters:
source- the object that fired this event (i.e. the component that is about to access the file).operation- the auditedFileAuditEvent.FileOperation.file- the filename the operation refers to.
-
-
Method Details
-
getOperation
Gets the audited file operation.- Returns:
- the
FileAuditEvent.FileOperation.
-
getFile
-
toString
- Overrides:
toStringin classEventObject
-