Skip to content

Commit 1e34931

Browse files
chore: create event deserializer interface
1 parent 9e2680d commit 1e34931

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
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.serialization;
10+
11+
import application.presenter.event.model.Event;
12+
13+
/**
14+
* Interface that models an event deserializer.
15+
*/
16+
public interface EventDeserializer {
17+
/**
18+
* Deserialize an event from string.
19+
* @param eventKey the key of the event.
20+
* @param event the event in string format.
21+
* @return the deserialized event.
22+
*/
23+
Event<?> fromString(String eventKey, String event);
24+
}

0 commit comments

Comments
 (0)