Package org.wildfly.security.audit
Class FileAuditEndpoint
java.lang.Object
org.wildfly.security.audit.FileAuditEndpoint
- All Implemented Interfaces:
Closeable,AutoCloseable,org.wildfly.common.function.ExceptionBiConsumer<EventPriority,,String, IOException> AuditEndpoint
- Direct Known Subclasses:
PeriodicRotatingFileAuditEndpoint,SizeRotatingFileAuditEndpoint
An audit endpoint to record all audit events to a local file.
- Author:
- Darran Lofthouse
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classA builder for file audit endpoints. -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoidaccept(EventPriority priority, String message) Accept formatted security event message to be processed written into target local file.static FileAuditEndpoint.Builderbuilder()Obtain a newFileAuditEndpoint.Buildercapable of building aFileAuditEndpoint.voidclose()Close the endpoint and stop handling further events immediately.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.wildfly.common.function.ExceptionBiConsumer
andThen, compose
-
Field Details
-
clock
Clock providing access to current time.
-
-
Method Details
-
accept
Accept formatted security event message to be processed written into target local file.- Specified by:
acceptin interfaceorg.wildfly.common.function.ExceptionBiConsumer<EventPriority,String, IOException> - Parameters:
priority- priority of the logged messagemessage- the logged message- Throws:
IOException- when writing into the target local file fails
-
close
Description copied from interface:AuditEndpointClose the endpoint and stop handling further events immediately.- Specified by:
closein interfaceAuditEndpoint- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException- if an error occurs closing the endpoint.
-
builder
Obtain a newFileAuditEndpoint.Buildercapable of building aFileAuditEndpoint.- Returns:
- a new
FileAuditEndpoint.Buildercapable of building aFileAuditEndpoint.
-