---
lang: en
title: 'API docs: core.lifecycleobserverregistry'
keywords: LoopBack 4.0, LoopBack 4
sidebar: lb4_sidebar
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 
```

## Constructors

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

## Properties

|  Property | Modifiers | Type | Description |
|  --- | --- | --- | --- |
|  [observersView](./core.lifecycleobserverregistry.observersview.md) |  | <code>ContextView&lt;LifeCycleObserver&gt;</code> |  |
|  [options](./core.lifecycleobserverregistry.options.md) |  | <code>LifeCycleObserverOptions</code> |  |

## 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 |
|  [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> |


