corda / net.corda.core.node / AppServiceHub / register


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

Allows to register ServiceLifecycleObserver such that it will start receiving


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): Unit

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