All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.com.copperleaf.ballast.repository.bus.EventBusEventHandler.kt Maven / Gradle / Ivy

There is a newer version: 4.2.1
Show newest version
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