File tree Expand file tree Collapse file tree 1 file changed +32
-0
lines changed
src/main/kotlin/application/presenter Expand file tree Collapse file tree 1 file changed +32
-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
10
+
11
+ import entities.events.Event
12
+ import io.reactivex.rxjava3.core.FlowableEmitter
13
+
14
+ /* *
15
+ * The consumer of events.
16
+ * It's responsible to consume events and to emit them to an Observer.
17
+ */
18
+ interface EventConsumer <in E > {
19
+
20
+ /* *
21
+ * The function to start the consumer.
22
+ * @param emitter the emitter of events.
23
+ */
24
+ fun start (emitter : FlowableEmitter <Event <Any >>)
25
+
26
+ /* *
27
+ * The function fon consuming events.
28
+ * @param inputEvent the input event.
29
+ * @return the parsed Event.
30
+ */
31
+ fun consumeEvent (inputEvent : E ): Event <* >
32
+ }
You can’t perform that action at this time.
0 commit comments