register

abstract fun register(priority: Int = SERVICE_PRIORITY_NORMAL, observer: ServiceLifecycleObserver)

Allows to register ServiceLifecycleObserver such that it will start receiving net.corda.core.node.services.ServiceLifecycleEvents

Parameters

priority

controls to which queue observer will be added. Higher values correspond to higher priorities.

observer

an instance of ServiceLifecycleObserver to be registered.


open fun <T> register(priority: Int = SERVICE_PRIORITY_NORMAL, func: (ServiceLifecycleEvent) -> T)

Convenience method to be able to add an arbitrary function as a register callback.