---
lang: en
title: 'API docs: core.lifecycleobserverregistry'
keywords: LoopBack 4.0, LoopBack 4, Node.js, TypeScript, OpenAPI
sidebar: lb4_sidebar
editurl: https://github.com/loopbackio/loopback-next/tree/master/packages/core
permalink: /doc/en/lb4/apidocs.core.lifecycleobserverregistry.html
---

<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@loopback/core](./core.md) &gt; [LifeCycleObserverRegistry](./core.lifecycleobserverregistry.md)

## LifeCycleObserverRegistry class

A context-based registry for life cycle observers

<b>Signature:</b>

```typescript
export declare class LifeCycleObserverRegistry implements LifeCycleObserver 
```
<b>Implements:</b> [LifeCycleObserver](./core.lifecycleobserver.md)

## Constructors

|  Constructor | Modifiers | Description |
|  --- | --- | --- |
|  [(constructor)(context, observersView, options)](./core.lifecycleobserverregistry._constructor_.md) |  | Constructs a new instance of the <code>LifeCycleObserverRegistry</code> class |

## Properties

|  Property | Modifiers | Type | Description |
|  --- | --- | --- | --- |
|  [context](./core.lifecycleobserverregistry.context.md) |  | [Context](./context.context.md) |  |
|  [observersView](./core.lifecycleobserverregistry.observersview.md) |  | [ContextView](./context.contextview.md)<!-- -->&lt;[LifeCycleObserver](./core.lifecycleobserver.md)<!-- -->&gt; |  |
|  [options](./core.lifecycleobserverregistry.options.md) |  | [LifeCycleObserverOptions](./core.lifecycleobserveroptions.md) |  |

## Methods

|  Method | Modifiers | Description |
|  --- | --- | --- |
|  [getObserverGroup(binding)](./core.lifecycleobserverregistry.getobservergroup.md) |  | Get the group for a given life cycle observer binding |
|  [getObserverGroupsByOrder()](./core.lifecycleobserverregistry.getobservergroupsbyorder.md) |  | Get observer groups ordered by the group |
|  [init()](./core.lifecycleobserverregistry.init.md) |  | Notify all life cycle observers by group of <code>init</code> |
|  [invokeObserver(observer, event)](./core.lifecycleobserverregistry.invokeobserver.md) |  | Invoke an observer for the given event |
|  [notifyGroups(events, groups, reverse)](./core.lifecycleobserverregistry.notifygroups.md) |  | Emit events to the observer groups |
|  [notifyObservers(observers, bindings, event)](./core.lifecycleobserverregistry.notifyobservers.md) |  | Notify an observer group of the given event |
|  [setOrderedGroups(groups)](./core.lifecycleobserverregistry.setorderedgroups.md) |  |  |
|  [sortObserverBindingsByGroup(bindings)](./core.lifecycleobserverregistry.sortobserverbindingsbygroup.md) |  | Sort the life cycle observer bindings so that we can start/stop them in the right order. By default, we can start other observers before servers and stop them in the reverse order |
|  [start()](./core.lifecycleobserverregistry.start.md) |  | Notify all life cycle observers by group of <code>start</code> |
|  [stop()](./core.lifecycleobserverregistry.stop.md) |  | Notify all life cycle observers by group of <code>stop</code> |


