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 theSubscriptionManager
andmessage
events 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 notificationBundle
has been received. -open
- The WebSocket has been opened. -close
- The WebSocket has been closed. -heartbeat
- Aheartbeat
message has been received.
Signature:
export declare class SubscriptionEmitter extends TypedEventTarget<SubscriptionEventMap>
Extends: TypedEventTarget<SubscriptionEventMap>
Constructors
Constructor | Modifiers | Description |
---|---|---|
Constructs a new instance of the |
Methods
Method | Modifiers | Description |
---|---|---|