001package io.ebean.event.readaudit;
002
003/**
004 * Set user context information into the read event prior to it being logged.
005 */
006public interface ReadAuditPrepare {
007
008  /**
009   * Prepare the read event by setting any user context information into the read event such as the
010   * application user id and ip address.
011   * <p>
012   * This method is called prior to the read event being sent to the ReadAuditLogger.
013   * </p>
014   * <p>
015   * Note that for findFutureList() queries prepare() is called early in the foreground thread
016   * prior to the query executing and at that point the ReadEvent bean only has the bean type
017   * and no other details (which are populated later when the query is executed in the background
018   * thread).
019   * </p>
020   */
021  void prepare(ReadEvent readEvent);
022
023}