Skip to main content

core.subscriptionemitter

Home > @medplum/core > SubscriptionEmitter

SubscriptionEmitter class

An EventTarget that emits events when new subscription notifications come in over WebSockets.

-----

### Events emitted:

  • connect - A new subscription is connected to the SubscriptionManager and message events for this subscription can be expected. - disconnect - The specified subscription is no longer being monitored by the SubscriptionManager. - error - An error has occurred. - message - A message containing a notification Bundle has been received. - open - The WebSocket has been opened. - close - The WebSocket has been closed. - heartbeat - A heartbeat message has been received.

Signature:

export declare class SubscriptionEmitter extends TypedEventTarget<SubscriptionEventMap> 

Extends: TypedEventTarget<SubscriptionEventMap>

Constructors

Constructor

Modifiers

Description

(constructor)(criteria)

Constructs a new instance of the SubscriptionEmitter class

Methods

Method

Modifiers

Description

getCriteria()