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

net.corda.node.services.NotaryChangeService.kt Maven / Gradle / Ivy

There is a newer version: 0.12.1
Show newest version
package net.corda.node.services

import net.corda.core.node.CordaPluginRegistry
import net.corda.core.node.PluginServiceHub
import net.corda.core.serialization.SingletonSerializeAsToken
import net.corda.flows.NotaryChangeFlow

object NotaryChange {
    class Plugin : CordaPluginRegistry() {
        override val servicePlugins: List> = listOf(Service::class.java)
    }

    /**
     * A service that monitors the network for requests for changing the notary of a state,
     * and immediately runs the [NotaryChangeFlow] if the auto-accept criteria are met.
     */
    class Service(services: PluginServiceHub) : SingletonSerializeAsToken() {
        init {
            services.registerFlowInitiator(NotaryChangeFlow.Instigator::class) { NotaryChangeFlow.Acceptor(it) }
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy