Interface AuditSink

All Superinterfaces:
AutoCloseable
All Known Implementing Classes:
CompositeAuditSink, FileAuditSink, InMemoryAuditSink, StdoutAuditSink, SyslogAuditSink
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface AuditSink extends AutoCloseable
SPI for persisting audit events.

Implementations must apply appropriate redaction policies and must never write secrets.

Thread safety

Implementations must be thread-safe; the PKI server calls record(AuditEvent) from multiple threads concurrently.

Since:
1.0
  • Method Summary

    Modifier and Type
    Method
    Description
    default void
    Releases lifecycle-owned sink resources.
    void
    Persists an audit event.
  • Method Details

    • record

      void record(AuditEvent event)
      Persists an audit event.
      Parameters:
      event - audit event
      Throws:
      IllegalArgumentException - if event is null
      RuntimeException - if persistence fails
    • close

      default void close()
      Releases lifecycle-owned sink resources.

      The default implementation owns no closeable resource. Stateful providers may override this method; repeated close calls should be harmless.

      Specified by:
      close in interface AutoCloseable