File tree Expand file tree Collapse file tree 1 file changed +34
-0
lines changed
src/env/application/presenter/event/model Expand file tree Collapse file tree 1 file changed +34
-0
lines changed Original file line number Diff line number Diff line change
1
+ /*
2
+ * Copyright (c) 2023. Smart Operating Block
3
+ *
4
+ * Use of this source code is governed by an MIT-style
5
+ * license that can be found in the LICENSE file or at
6
+ * https://opensource.org/licenses/MIT.
7
+ */
8
+
9
+ package application .presenter .event .model ;
10
+
11
+ /**
12
+ * Interface that models a generic event with no additional fields but only with a key,
13
+ * a payload data of type E and the dateTime of the event itself.
14
+ * @param <E> the type of the payload data.
15
+ */
16
+ public interface Event <E > {
17
+ /**
18
+ * Get the key of the event.
19
+ * @return the key.
20
+ */
21
+ String getKey ();
22
+
23
+ /**
24
+ * Get the data payload of the event.
25
+ * @return the data payload.
26
+ */
27
+ E getData ();
28
+
29
+ /**
30
+ * Get the date time in string format.
31
+ * @return the string of date time.
32
+ */
33
+ String getDateTime ();
34
+ }
You can’t perform that action at this time.
0 commit comments