corda / net.corda.core.node.services / ServiceLifecycleObserver

ServiceLifecycleObserver

@FunctionalInterface interface ServiceLifecycleObserver

Specifies that given CordaService is interested to know about important milestones of Corda Node lifecycle and potentially react to them. Subscription can be performed using net.corda.core.node.AppServiceHub.register method from a constructor of CordaService.

Functions

onServiceLifecycleEvent

abstract fun onServiceLifecycleEvent(event: ServiceLifecycleEvent): Unit

A handler for ServiceLifecycleEvents. Default implementation does nothing.

Extension Functions

contextLogger

fun Any.contextLogger(): Logger

When called from a companion object, returns the logger for the enclosing class.