Interface EventPublication
- All Superinterfaces:
Comparable<EventPublication>
- All Known Subinterfaces:
CompletableEventPublication
- All Known Implementing Classes:
DefaultEventPublication
An event publication.
- Author:
- Oliver Drotbohm, Björn Kieling, Dmitry Belyaev
-
Method Summary
Modifier and TypeMethodDescriptiondefault int
compareTo
(EventPublication that) default ApplicationEvent
Returns the event as SpringApplicationEvent
, effectively wrapping it into aPayloadApplicationEvent
in case it's not one already.getEvent()
Returns the event that is published.Returns the time the event is published at.Returns the identifier of the target that the event is supposed to be published to.default boolean
isIdentifiedBy
(PublicationTargetIdentifier identifier) Returns whether the publication is identified by the givenPublicationTargetIdentifier
.
-
Method Details
-
getEvent
Object getEvent()Returns the event that is published.- Returns:
-
getApplicationEvent
Returns the event as SpringApplicationEvent
, effectively wrapping it into aPayloadApplicationEvent
in case it's not one already.- Returns:
-
getPublicationDate
Instant getPublicationDate()Returns the time the event is published at.- Returns:
-
getTargetIdentifier
PublicationTargetIdentifier getTargetIdentifier()Returns the identifier of the target that the event is supposed to be published to.- Returns:
-
isIdentifiedBy
Returns whether the publication is identified by the givenPublicationTargetIdentifier
.- Parameters:
identifier
- must not be null.- Returns:
-
compareTo
- Specified by:
compareTo
in interfaceComparable<EventPublication>
-