Interface EventPublication

All Known Subinterfaces:
TargetEventPublication
All Known Implementing Classes:
DefaultEventPublication

public interface EventPublication
An event publication.
Since:
1.1
Author:
Oliver Drotbohm
  • Method Details

    • getIdentifier

      UUID getIdentifier()
      Returns a unique identifier for this publication.
      Returns:
      will never be null.
    • getEvent

      Object getEvent()
      Returns the event that is published.
      Returns:
      will never be null.
    • getApplicationEvent

      default ApplicationEvent getApplicationEvent()
      Returns the event as Spring ApplicationEvent: the event itself if it already is one, or the event wrapped into a PayloadApplicationEvent otherwise.
      Returns:
      the underlying event as ApplicationEvent.
    • getPublicationDate

      Instant getPublicationDate()
      Returns the time the event is published at.
      Returns:
      will never be null.
    • getCompletionDate

      Optional<Instant> getCompletionDate()
      Returns the completion date of the publication.
      Returns:
      will never be null.
    • isCompleted

      default boolean isCompleted()
      Returns whether the publication of the event has completed.
      Since:
      1.3
    • getStatus

      Return the publication's EventPublication.Status.
      Returns:
      will never be null.
      Since:
      2.0
    • getLastResubmissionDate

      @Nullable Instant getLastResubmissionDate()
      Returns the last time the EventPublication was resubmitted.
      Returns:
      can be null.
      Since:
      2.0
    • getLastPublicationDate

      default Instant getLastPublicationDate()
      Returns the date that the publication has been last published at. This will consider the most recent resubmission before falling back to the original publication date.
      Returns:
      will never be null.
      Since:
      2.2, 2.1.2, 2.0.9
      See Also:
    • getCompletionAttempts

      int getCompletionAttempts()
      Returns the number of completion attempts.
      Since:
      2.0
    • compareTo

      default int compareTo(EventPublication that)