class DomainEventProcessor {

  private final EventJournal eventJournal;

  public DomainEventProcessor(EventJournal eventJournal) {
    this.eventJournal = eventJournal;
  }

  /**
   * Process.
   *
   * @param domainEvent the domain event
   */
  public void process(DomainEvent domainEvent) {
    domainEvent.process();
    eventJournal.write(domainEvent);
  }

  /**
   * Reset.
   */
  public void reset() {
    eventJournal.reset();
  }

  /**
   * Recover.
   */
  public void recover() {<FILL_FUNCTION_BODY>}
}

    DomainEvent domainEvent;
    while ((domainEvent = eventJournal.readNext()) != null) {
      domainEvent.process();
    }
  
<no_super_class>