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 theSubscriptionManagerandmessageevents for this subscription can be expected. -disconnect- The specified subscription is no longer being monitored by theSubscriptionManager. -error- An error has occurred. -message- A message containing a notificationBundlehas been received. -close- The WebSocket has been closed. -heartbeat- Aheartbeatmessage 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() |