Class DefaultCompositeAuditService

java.lang.Object
com.svenruppert.jsentinel.audit.DefaultCompositeAuditService
All Implemented Interfaces:
JSentinelAuditService

public final class DefaultCompositeAuditService extends Object implements JSentinelAuditService
No-arg JSentinelAuditService suitable for META-INF/services registration. Combines a default-sized RingBufferAuditSink (for query(AuditQuery)) with a LoggingAuditSink that mirrors every event to java.util.logging at INFO.

Applications that want different retention or additional sinks should register their own JSentinelAuditService implementation instead of this default.

  • Constructor Details

    • DefaultCompositeAuditService

      public DefaultCompositeAuditService()
  • Method Details

    • publish

      public void publish(AuditEvent event)
      Description copied from interface: JSentinelAuditService
      Records the given event. Never throws.
      Specified by:
      publish in interface JSentinelAuditService
      Parameters:
      event - non-null typed audit event
    • query

      public List<AuditEvent> query(AuditQuery query)
      Description copied from interface: JSentinelAuditService
      Returns retained events matching query, oldest first. Implementations that do not retain events return an empty list.
      Specified by:
      query in interface JSentinelAuditService
      Parameters:
      query - filter, never null
      Returns:
      retained matching events, never null
    • ringBuffer

      public RingBufferAuditSink ringBuffer()
      Exposed so a Vaadin /audit-route can read the ring buffer directly.