Package org.wildfly.security.audit
Class SyslogAuditEndpoint
- java.lang.Object
-
- org.wildfly.security.audit.SyslogAuditEndpoint
-
- All Implemented Interfaces:
Closeable,AutoCloseable,ExceptionBiConsumer<EventPriority,String,IOException>,AuditEndpoint
public class SyslogAuditEndpoint extends Object implements AuditEndpoint
An audit endpoint that logs to syslog server.- Author:
- Darran Lofthouse
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSyslogAuditEndpoint.BuilderA builder for syslog audit endpoint.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaccept(EventPriority priority, String message)Performs this operation on the given arguments.static SyslogAuditEndpoint.Builderbuilder()Obtain a newSyslogAuditEndpoint.Buildercapable of building aSyslogAuditEndpoint.voidclose()Close the endpoint and stop handling further events immediately.intgetAttempts()Gets the current amount of reconnect attempts, with -1 signifying that the value for infinite reconnect attempts case has overflowed the maximum allowed amount-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.wildfly.common.function.ExceptionBiConsumer
andThen, compose
-
-
-
-
Method Detail
-
accept
public void accept(EventPriority priority, String message) throws IOException
Description copied from interface:ExceptionBiConsumerPerforms this operation on the given arguments.- Specified by:
acceptin interfaceExceptionBiConsumer<EventPriority,String,IOException>- Parameters:
priority- the first argumentmessage- the second argument- Throws:
IOException
-
getAttempts
public int getAttempts()
Gets the current amount of reconnect attempts, with -1 signifying that the value for infinite reconnect attempts case has overflowed the maximum allowed amount- Returns:
- The current reconnect attempts, or -1 if the maximum tracked value for infinite attempts has overflowed
-
close
public void close() throws IOExceptionDescription 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
public static SyslogAuditEndpoint.Builder builder()
Obtain a newSyslogAuditEndpoint.Buildercapable of building aSyslogAuditEndpoint.- Returns:
- a new
SyslogAuditEndpoint.Buildercapable of building aSyslogAuditEndpoint.
-
-