We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4bd52b5 commit e310e78Copy full SHA for e310e78
core/src/main/java/com/github/philippheuer/events4j/core/domain/Event.java
@@ -40,8 +40,18 @@ public abstract class Event implements IEvent {
40
* Constructor
41
*/
42
public Event() {
43
- eventId = UUID.randomUUID().toString();
44
- firedAtInstant = Instant.now();
+ this(UUID.randomUUID().toString(), Instant.now());
+ }
45
+
46
+ /**
47
+ * Constructor
48
+ *
49
+ * @param eventId Unique event id
50
+ * @param firedAt Timestamp of the event firing
51
+ */
52
+ public Event(String eventId, Instant firedAt) {
53
+ this.eventId = eventId;
54
+ this.firedAtInstant = firedAt;
55
}
56
57
@Override
0 commit comments