Class StreamAuditEventListener

java.lang.Object
org.nuxeo.ecm.platform.audit.listener.StreamAuditEventListener
All Implemented Interfaces:
javax.transaction.Synchronization, EventListener

public class StreamAuditEventListener extends Object implements EventListener, javax.transaction.Synchronization
An events collector that write log entries as json record into a stream.
Since:
9.3
  • Field Details

  • Constructor Details

    • StreamAuditEventListener

      public StreamAuditEventListener()
  • Method Details

    • handleEvent

      public void handleEvent(Event event)
      Description copied from interface: EventListener
      Handle the given event. The listener can cancel the event by calling Event.cancel()
      Specified by:
      handleEvent in interface EventListener
      Parameters:
      event - the event
    • beforeCompletion

      public void beforeCompletion()
      Specified by:
      beforeCompletion in interface javax.transaction.Synchronization
    • afterCompletion

      public void afterCompletion(int status)
      Specified by:
      afterCompletion in interface javax.transaction.Synchronization
    • writeEntries

      protected void writeEntries()
    • getPartitionKey

      protected String getPartitionKey()
    • recordOf

      protected Record recordOf(LogEntry entry)
    • recordOf

      protected Record recordOf(String partitionKey, LogEntry entry)
    • getTimestampForEntry

      protected long getTimestampForEntry(LogEntry entry)
    • asJson

      protected String asJson(LogEntry entry)
    • registerSynchronization

      protected boolean registerSynchronization(javax.transaction.Synchronization sync)
    • getStreamManager

      protected StreamManager getStreamManager()