Interface JobEvent

All Known Subinterfaces:
FailureEvent, HeartbeatEvent, LifecycleEvent, NotificationEvent, OperationalEvent, ProgressEvent, RetryEvent, SuccessEvent, SystemEvent, TerminalEvent, WorkflowTerminationEvent
All Known Implementing Classes:
AbstractJobEvent, AbstractTerminalEvent, CancelHeartbeat, ContentStreamEvent, DependencyFailureEvent, HeartbeatFired, HeartbeatFireFailed, HeartbeatRebound, HeartbeatRequested, HeartbeatScheduled, JobCancelled, JobCompletedEvent, JobFailedEvent, JobProgressEvent, JobScheduled, JobStartedEvent, JobTimedOut, LimiterEvent, MessageCompleteEvent, OrchestratorIdleEvent, OrchestratorResumedEvent, OutputTruncationRetryEvent, RateLimitRetryEvent, ResponseCorrectionRetryEvent, SchedulerEvent, TransientErrorRetryEvent, UserNotificationEvent, WorkflowCompleteEvent

public interface JobEvent
Base interface for all job-related events: a snapshot of the job at the moment of the event, the event's instant, and an optional message. The bus routes by the concrete event class, the snapshot's workflow id and the snapshot's job class.
Since:
0.1 (2025-08-10)
Author:
Andrey Santrosyan
  • Method Summary

    Modifier and Type
    Method
    Description
    Gets the message associated with this event.
    Gets the job snapshot containing all job metadata and state.
    Gets the timestamp when this event was created.
  • Method Details

    • snapshot

      JobSnapshot snapshot()
      Gets the job snapshot containing all job metadata and state. This is an immutable snapshot of the job at the time the event was created.
      Returns:
      the job snapshot
    • timestamp

      Instant timestamp()
      Gets the timestamp when this event was created.
      Returns:
      the event creation timestamp
    • message

      String message()
      Gets the message associated with this event. May provide additional context about the state change or event.
      Returns:
      the event message, may be null