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

ru.hnau.jutils.producer.WrapProducer.kt Maven / Gradle / Ivy

There is a newer version: 2.1.1
Show newest version
package ru.hnau.jutils.producer


abstract class WrapProducer(
        private val inProducer: Producer
) : Producer() {

    abstract fun onWrappedProducerCall(data: I)

    override fun onFirstAttached() {
        super.onFirstAttached()
        inProducer.attach(this::onWrappedProducerCall)
    }

    override fun onLastDetached() {
        super.onLastDetached()
        inProducer.detach(this::onWrappedProducerCall)
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy