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
ConstructorsConstructorDescriptionDefaultEventPublication(Object event, PublicationTargetIdentifier targetIdentifier) Creates a newDefaultEventPublicationfor the given event andPublicationTargetIdentifier. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns 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.inthashCode()Marks the event publication as completed.toString()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.springframework.modulith.events.CompletableEventPublication
isPublicationCompletedMethods inherited from interface org.springframework.modulith.events.EventPublication
compareTo, getApplicationEvent, isIdentifiedBy
-
Constructor Details
-
DefaultEventPublication
DefaultEventPublication(Object event, PublicationTargetIdentifier targetIdentifier) Creates a newDefaultEventPublicationfor the given event andPublicationTargetIdentifier.- Parameters:
event- must not be null.targetIdentifier- must not be null.
-
-
Method Details
-
getEvent
Description copied from interface:EventPublicationReturns the event that is published.- Specified by:
getEventin interfaceEventPublication- Returns:
-
getTargetIdentifier
Description copied from interface:EventPublicationReturns the identifier of the target that the event is supposed to be published to.- Specified by:
getTargetIdentifierin interfaceEventPublication- Returns:
-
getPublicationDate
Description copied from interface:EventPublicationReturns the time the event is published at.- Specified by:
getPublicationDatein interfaceEventPublication- Returns:
-
getCompletionDate
Description copied from interface:CompletableEventPublicationReturns the completion date of the publication.- Specified by:
getCompletionDatein interfaceCompletableEventPublication- Returns:
- will never be null.
-
markCompleted
Description copied from interface:CompletableEventPublicationMarks the event publication as completed.- Specified by:
markCompletedin interfaceCompletableEventPublication- Returns:
-
toString
-
equals
-
hashCode
public int hashCode()
-