Skip to content

Commit 0ae4043

Browse files
feat: create event parser interface
1 parent d68adc0 commit 0ae4043

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
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+
13+
/**
14+
* The parser has the responsibility to parse the input event in order to propagate the correct event to microservices.
15+
*/
16+
interface EventParser<in E> {
17+
18+
/**
19+
* The function to parse the event.
20+
* @param inputEvent the input event.
21+
*/
22+
fun parseEvent(inputEvent: E): Event<Any>
23+
}

0 commit comments

Comments
 (0)