Interface EventPublication
- All Known Subinterfaces:
TargetEventPublication
- All Known Implementing Classes:
DefaultEventPublication
public interface EventPublication
An event publication.
- Since:
- 1.1
- Author:
- Oliver Drotbohm
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptiondefault intcompareTo(EventPublication that) default ApplicationEventReturns the event as SpringApplicationEvent, effectively wrapping it into aPayloadApplicationEventin case it's not one already.intReturns the number of completion attempts.Returns the completion date of the publication.getEvent()Returns the event that is published.Returns a unique identifier for this publication.@Nullable InstantReturns the last time theEventPublicationwas resubmitted.Returns the time the event is published at.Return the publication'sEventPublication.Status.default booleanReturns whether the publication of the event has completed.default booleanDeprecated.
-
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
Returns the event as SpringApplicationEvent, effectively wrapping it into aPayloadApplicationEventin case it's not one already.- Returns:
- the underlying event as
ApplicationEvent.
-
getPublicationDate
Instant getPublicationDate()Returns the time the event is published at.- Returns:
- will never be null.
-
getCompletionDate
Returns the completion date of the publication.- Returns:
- will never be null.
-
isPublicationCompleted
Deprecated.since 1.3, useisCompleted()instead.Returns whether the publication of the event has completed. -
isCompleted
default boolean isCompleted()Returns whether the publication of the event has completed.- Since:
- 1.3
-
getStatus
EventPublication.Status getStatus()Return the publication'sEventPublication.Status.- Returns:
- will never be null.
- Since:
- 2.0
-
getLastResubmissionDate
@Nullable Instant getLastResubmissionDate()Returns the last time theEventPublicationwas resubmitted.- Returns:
- can be null.
- Since:
- 2.0
-
getCompletionAttempts
int getCompletionAttempts()Returns the number of completion attempts.- Since:
- 2.0
-
compareTo
-
isCompleted()instead.