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
ConstructorDescriptionDefaultEventPublication
(Object event, PublicationTargetIdentifier targetIdentifier, Instant publicationDate) 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 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.int
hashCode()
void
markCompleted
(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, wait
Methods inherited from interface org.springframework.modulith.events.EventPublication
compareTo, getApplicationEvent, isPublicationCompleted
Methods inherited from interface org.springframework.modulith.events.core.TargetEventPublication
isIdentifiedBy
-
Constructor Details
-
DefaultEventPublication
DefaultEventPublication(Object event, PublicationTargetIdentifier targetIdentifier, Instant publicationDate) Creates a newDefaultEventPublication
for 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:EventPublication
Returns a unique identifier for this publication.- Specified by:
getIdentifier
in interfaceEventPublication
- Returns:
- will never be null.
-
getEvent
Description copied from interface:EventPublication
Returns the event that is published.- Specified by:
getEvent
in interfaceEventPublication
- Returns:
- will never be null.
-
getTargetIdentifier
Description copied from interface:TargetEventPublication
Returns the identifier of the target that the event is supposed to be published to.- Specified by:
getTargetIdentifier
in interfaceTargetEventPublication
- Returns:
-
getPublicationDate
Description copied from interface:EventPublication
Returns the time the event is published at.- Specified by:
getPublicationDate
in interfaceEventPublication
- Returns:
- will never be null.
-
getCompletionDate
Description copied from interface:EventPublication
Returns the completion date of the publication.- Specified by:
getCompletionDate
in interfaceEventPublication
- Returns:
- will never be null.
-
markCompleted
Description copied from interface:Completable
Marks the instance as completed at the givenInstant
.- Specified by:
markCompleted
in interfaceCompletable
- Parameters:
instant
- must not be null.
-
toString
-
equals
-
hashCode
public int hashCode()
-