Add (v1) NetworkManager, Session and Transport #173

Merged
lars.winzer merged 26 commits from feat/network-manager into main 2026-03-13 15:49:56 +01:00
Showing only changes of commit 74566f99cf - Show all commits
@@ -13,7 +13,7 @@ public class EventBus {
@SuppressWarnings("unchecked") // This cast is safe, because handlers only get passed the type they subscribed to @SuppressWarnings("unchecked") // This cast is safe, because handlers only get passed the type they subscribed to
public <T extends Event> void subscribe(Class<T> eventType, Consumer<T> handler) { public <T extends Event> void subscribe(Class<T> eventType, Consumer<T> handler) {
handlers.computeIfAbsent(eventType, k -> new CopyOnWriteArrayList<>()) handlers.computeIfAbsent(eventType, k -> new CopyOnWriteArrayList<>())
.add((Consumer<Object>) handler); .add((Consumer<Object>) (Consumer<?>) handler);
} }
public <T extends Event> void publish(T event) { public <T extends Event> void publish(T event) {