Package org.wildfly.security.audit
Class JsonSecurityEventFormatter.Builder
- java.lang.Object
-
- org.wildfly.security.audit.JsonSecurityEventFormatter.Builder
-
- Enclosing class:
- JsonSecurityEventFormatter
public static class JsonSecurityEventFormatter.Builder extends Object
A builder for JSON security event formatter.
-
-
Field Summary
Fields Modifier and Type Field Description private Supplier<DateTimeFormatter>
dateTimeFormatterSupplier
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SecurityEventVisitor<?,String>
build()
Build a newSecurityEventVisitor
which will convert events into JSON formatted strings.JsonSecurityEventFormatter.Builder
setDateTimeFormatterSupplier(Supplier<DateTimeFormatter> dateTimeFormatterSupplier)
Set a supplier of formatter to format any dates in the resulting output.
-
-
-
Field Detail
-
dateTimeFormatterSupplier
private Supplier<DateTimeFormatter> dateTimeFormatterSupplier
-
-
Method Detail
-
setDateTimeFormatterSupplier
public JsonSecurityEventFormatter.Builder setDateTimeFormatterSupplier(Supplier<DateTimeFormatter> dateTimeFormatterSupplier)
Set a supplier of formatter to format any dates in the resulting output. The suppliedDateTimeFormatter
has to have a time zone configured.- Parameters:
dateTimeFormatterSupplier
- a supplier of formatter to format dates in the resulting output- Returns:
- this builder
-
build
public SecurityEventVisitor<?,String> build()
Build a newSecurityEventVisitor
which will convert events into JSON formatted strings.Once built the Builder can continue to be configured to create additional instances.
- Returns:
- a new
SecurityEventVisitor
which will convert events into JSON formatted strings
-
-