Class DefaultEventPublication
java.lang.Object
org.springframework.modulith.events.core.DefaultEventPublication
- All Implemented Interfaces:
Completable,TargetEventPublication,EventPublication
Default
Completable implementation.- Author:
- Oliver Drotbohm
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultEventPublication(Object event, PublicationTargetIdentifier targetIdentifier, Instant publicationDate) 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 a unique identifier for this publication.Returns the time the event is published at.Returns the identifier of the target that the event is supposed to be published to.inthashCode()voidmarkCompleted(Instant instant) Marks the instance as completed at the givenInstant.toString()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.springframework.modulith.events.EventPublication
compareTo, getApplicationEvent, isCompleted, isPublicationCompletedMethods inherited from interface org.springframework.modulith.events.core.TargetEventPublication
isAssociatedWith, isIdentifiedBy
-
Constructor Details
-
DefaultEventPublication
DefaultEventPublication(Object event, PublicationTargetIdentifier targetIdentifier, Instant publicationDate) Creates a newDefaultEventPublicationfor the given event andPublicationTargetIdentifier.- Parameters:
event- must not be null.targetIdentifier- must not be null.publicationDate- must not be null.
-
-
Method Details
-
getIdentifier
Description copied from interface:EventPublicationReturns a unique identifier for this publication.- Specified by:
getIdentifierin interfaceEventPublication- Returns:
- will never be null.
-
getEvent
Description copied from interface:EventPublicationReturns the event that is published.- Specified by:
getEventin interfaceEventPublication- Returns:
- will never be null.
-
getTargetIdentifier
Description copied from interface:TargetEventPublicationReturns the identifier of the target that the event is supposed to be published to.- Specified by:
getTargetIdentifierin interfaceTargetEventPublication- Returns:
-
getPublicationDate
Description copied from interface:EventPublicationReturns the time the event is published at.- Specified by:
getPublicationDatein interfaceEventPublication- Returns:
- will never be null.
-
getCompletionDate
Description copied from interface:EventPublicationReturns the completion date of the publication.- Specified by:
getCompletionDatein interfaceEventPublication- Returns:
- will never be null.
-
markCompleted
Description copied from interface:CompletableMarks the instance as completed at the givenInstant.- Specified by:
markCompletedin interfaceCompletable- Parameters:
instant- must not be null.
-
toString
-
equals
-
hashCode
public int hashCode()
-