ServiceLifecycleObserver
Keywords: net.corda.core.node.services.ServiceLifecycleObserver interface
Date: 2023-09-18

net.corda.core.node.services

## Interface ServiceLifecycleObserver

-     @FunctionalInterface
      public ServiceLifecycleObserver

  Specifies that given `annotationclass 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 `annotationclass CordaService`.

  See Also:
    `annotationclass CordaService`, `net.corda.core.node.AppServiceHub.register`, `annotationclass CordaService`

- - ### Constructor Detail

    - #### ServiceLifecycleObserver

          public ServiceLifecycleObserver()

  - ### Method Detail

    - #### onServiceLifecycleEvent

          void onServiceLifecycleEvent(@NotNull
                                       ServiceLifecycleEvent event)

      A handler for `enum ServiceLifecycleEvent`s. Default implementation does nothing.

      See Also:
        `enum ServiceLifecycleEvent`