typed
Java interop overload of typed. The rootClass token is unused at runtime (generics are erased) but satisfies Java's type inference:
TypedEventBus<NetworkEvent> bus =
TypedEventBusFactory.typed(underlying, NetworkEvent.class);Content copied to clipboard
Returns a TypedEventBus view over this bus restricted to subtypes of E.
The returned bus shares the underlying handler registry; handlers registered on either the typed view or the original bus are visible to both.
val networkBus = EventBus().typed<NetworkEvent>()
networkBus.post(PacketReceived(bytes))Content copied to clipboard