Package org.wildfly.security.audit
Class PeriodicRotatingFileAuditEndpoint.Builder
- java.lang.Object
-
- org.wildfly.security.audit.FileAuditEndpoint.Builder
-
- org.wildfly.security.audit.PeriodicRotatingFileAuditEndpoint.Builder
-
- Enclosing class:
- PeriodicRotatingFileAuditEndpoint
public static class PeriodicRotatingFileAuditEndpoint.Builder extends FileAuditEndpoint.Builder
A builder for periodic rotating file audit endpoints.
-
-
Field Summary
Fields Modifier and Type Field Description (package private) DateTimeFormatter
format
(package private) PeriodicRotatingFileAuditEndpoint.Period
period
(package private) ZoneId
timeZone
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AuditEndpoint
build()
Construct a new instance.PeriodicRotatingFileAuditEndpoint.Builder
setSuffix(String suffix)
Set the suffix string.PeriodicRotatingFileAuditEndpoint.Builder
setTimeZone(ZoneId timeZone)
Set the configured time zone for this handler.-
Methods inherited from class org.wildfly.security.audit.FileAuditEndpoint.Builder
setClock, setDateTimeFormatterSupplier, setFlushOnAccept, setLocation, setSyncOnAccept
-
-
-
-
Field Detail
-
format
DateTimeFormatter format
-
period
PeriodicRotatingFileAuditEndpoint.Period period
-
timeZone
ZoneId timeZone
-
-
Method Detail
-
setTimeZone
public PeriodicRotatingFileAuditEndpoint.Builder setTimeZone(ZoneId timeZone)
Set the configured time zone for this handler.- Parameters:
timeZone
- the configured time zone- Returns:
- this builder
-
setSuffix
public PeriodicRotatingFileAuditEndpoint.Builder setSuffix(String suffix) throws IllegalArgumentException
Set the suffix string. The string is in a format which can be understood byDateTimeFormatter
. The period of the rotation is automatically calculated based on the suffix.- Parameters:
suffix
- the suffix- Returns:
- this builder
- Throws:
IllegalArgumentException
- if the suffix is not valid
-
build
public AuditEndpoint build() throws IOException
Construct a new instance.- Overrides:
build
in classFileAuditEndpoint.Builder
- Returns:
- the built audit endpoint.
- Throws:
IOException
- if an I/O error occurs.
-
-