<?php

declare(strict_types=1);

namespace Drupal\flowdrop_session\Service;

use Drupal\flowdrop_session\Entity\FlowDropSessionMessageInterface;

/**
 * Interface for deferred message scheduling.
 *
 * Implementations queue messages for processing after the HTTP response
 * has been sent to the client.
 *
 * @internal
 *   This class is not part of the public API and may change without notice.
 */
interface DeferredSchedulerInterface {

  /**
   * Schedules a user message for deferred processing.
   *
   * @param \Drupal\flowdrop_session\Entity\FlowDropSessionMessageInterface $message
   *   The user message to process.
   */
  public function schedule(FlowDropSessionMessageInterface $message): void;

}
