Skip to content

Commit a8c2229

Browse files
chore: create interface for the event manager
1 parent 26361d1 commit a8c2229

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.controller.manager;
10+
11+
import application.presenter.event.model.Event;
12+
13+
import java.util.function.Consumer;
14+
15+
/**
16+
* Interface that models a manager that is able to obtain event from the external.
17+
*/
18+
public interface EventManager {
19+
/**
20+
* Method used to consume events via polling providing a consumer to process them.
21+
* @param eventConsumer the consumer used to consume the event.
22+
*/
23+
void poll(Consumer<Event<?>> eventConsumer);
24+
}

0 commit comments

Comments
 (0)