Class DefaultEventPublication
java.lang.Object
org.springframework.modulith.events.DefaultEventPublication
- All Implemented Interfaces:
Comparable<EventPublication>
,CompletableEventPublication
,EventPublication
Default
CompletableEventPublication
implementation.- Author:
- Oliver Drotbohm
-
Constructor Summary
ConstructorDescriptionDefaultEventPublication
(Object event, PublicationTargetIdentifier targetIdentifier) Creates a newDefaultEventPublication
for the given event andPublicationTargetIdentifier
. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Returns the completion date of the publication.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.int
hashCode()
Marks the event publication as completed.toString()
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.springframework.modulith.events.CompletableEventPublication
isPublicationCompleted
Methods inherited from interface org.springframework.modulith.events.EventPublication
compareTo, getApplicationEvent, isIdentifiedBy
-
Constructor Details
-
DefaultEventPublication
DefaultEventPublication(Object event, PublicationTargetIdentifier targetIdentifier) Creates a newDefaultEventPublication
for the given event andPublicationTargetIdentifier
.- Parameters:
event
- must not be null.targetIdentifier
- must not be null.
-
-
Method Details
-
getEvent
Description copied from interface:EventPublication
Returns the event that is published.- Specified by:
getEvent
in interfaceEventPublication
- Returns:
-
getTargetIdentifier
Description copied from interface:EventPublication
Returns the identifier of the target that the event is supposed to be published to.- Specified by:
getTargetIdentifier
in interfaceEventPublication
- Returns:
-
getPublicationDate
Description copied from interface:EventPublication
Returns the time the event is published at.- Specified by:
getPublicationDate
in interfaceEventPublication
- Returns:
-
getCompletionDate
Description copied from interface:CompletableEventPublication
Returns the completion date of the publication.- Specified by:
getCompletionDate
in interfaceCompletableEventPublication
- Returns:
- will never be null.
-
markCompleted
Description copied from interface:CompletableEventPublication
Marks the event publication as completed.- Specified by:
markCompleted
in interfaceCompletableEventPublication
- Returns:
-
toString
-
equals
-
hashCode
public int hashCode()
-