Class JobCancelled

All Implemented Interfaces:
LifecycleEvent, TerminalEvent, JobEvent, Serializable

public final class JobCancelled extends AbstractTerminalEvent<Void>
Event published when a job is cancelled by explicit request.

Not a FailureEvent - cancellation is a deliberate decision to stop, not a failure to complete. Carries whether the stop was forced; its message is Job cancelled or Job forcefully cancelled. For a job cancelled while still queued, the dispatcher builds the event with the remover's message through the message-taking constructor, never by mutating a built event: Cancelled while queued: <reason> from a cancel by id, Workflow cancelled: <reason> from a workflow cancel, Cancelled by shutdown at shutdown.

Since:
0.1 (2025-09-11)
Author:
Andrey Santrosyan
See Also:
  • Constructor Details

    • JobCancelled

      public JobCancelled(JobSnapshot snapshot, boolean force, int attempts, List<LLMResponse<?>> llmResponses, Map<String,Object> metadata)
    • JobCancelled

      public JobCancelled(JobSnapshot snapshot, boolean force, String message, int attempts, List<LLMResponse<?>> llmResponses, Map<String,Object> metadata)
      A cancellation whose message the publisher states at construction, as the dispatcher does for a job cancelled while still queued.
  • Method Details

    • force

      public boolean force()