commonMain.com.copperleaf.ballast.repository.bus.EventBusEventHandler.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ballast-repository-jvm Show documentation
Show all versions of ballast-repository-jvm Show documentation
Opinionated Kotlin multiplatform Repository Caching library based on Ballast MVI
package com.copperleaf.ballast.repository.bus
import com.copperleaf.ballast.EventHandler
import com.copperleaf.ballast.EventHandlerScope
/**
* Dispatch all Events from this Repository to the shared EventBus, to be received from other Repositories as
* appropriate.
*/
public class EventBusEventHandler(
private val eventBus: EventBus
) : EventHandler {
override suspend fun EventHandlerScope.handleEvent(
event: Any
) {
with(eventBus) {
send(event)
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy