Class JobCompletedEvent<R>

Type Parameters:
R - the type of result
All Implemented Interfaces:
LifecycleEvent, SuccessEvent, TerminalEvent, JobEvent, Serializable

public final class JobCompletedEvent<R> extends AbstractTerminalEvent<R> implements SuccessEvent
Event published when a job completes successfully. Carries the result, as an optional through getResult() (empty for a null result) and directly through result(); its message is Job completed successfully (attempt <n>).
Since:
0.1 (2025-09-15)
Author:
Andrey Santrosyan
See Also:
  • Constructor Details

  • Method Details

    • getResult

      public Optional<R> getResult()
      Description copied from class: AbstractTerminalEvent
      The result, present on a completion event only; empty on every other terminal event.
      Overrides:
      getResult in class AbstractTerminalEvent<R>
      Returns:
      optional result
    • result

      public R result()
      Gets the result directly (non-optional). Use this when you know the result is not null.
      Returns:
      the result