Skip to content

Latest commit

 

History

History
217 lines (119 loc) · 3.29 KB

NotificationListener.md

File metadata and controls

217 lines (119 loc) · 3.29 KB

lms-cli-notifications / NotificationListener

Class: NotificationListener

Hierarchy

  • EventEmitter

    NotificationListener

Table of contents

Constructors

Methods

Events

Constructors

constructor

new NotificationListener(params)

Parameters

Name Type
params NotificationListenerParams

Overrides

EventEmitter.constructor

Defined in

src/NotificationListener.ts:46

Methods

getSubscribed

getSubscribed(): string[]

Returns

string[]

Defined in

src/NotificationListener.ts:302


isConnected

isConnected(): boolean

Returns

boolean

Defined in

src/NotificationListener.ts:133


start

start(): Promise<boolean>

Returns

Promise<boolean>

Defined in

src/NotificationListener.ts:88


stop

stop(): Promise<boolean>

Returns

Promise<boolean>

Defined in

src/NotificationListener.ts:126


subscribe

subscribe(notification): Promise<undefined | true>

Parameters

Name Type
notification string | string[]

Returns

Promise<undefined | true>

Defined in

src/NotificationListener.ts:258


unsubscribe

unsubscribe(notification): Promise<undefined | true>

Parameters

Name Type
notification string | string[]

Returns

Promise<undefined | true>

Defined in

src/NotificationListener.ts:280

Events

on

on(event, listener): NotificationListener

Server connected.

Parameters

Name Type
event "connect"
listener (server: { host: string ; port: string }) => void

Returns

NotificationListener

Overrides

EventEmitter.on

Defined in

src/NotificationListener.ts:312

on(event, listener): NotificationListener

Server disconnected.

Parameters

Name Type
event "disconnect"
listener (server: { host: string ; port: string }) => void

Returns

NotificationListener

Overrides

EventEmitter.on

Defined in

src/NotificationListener.ts:319

on(event, listener): NotificationListener

Subscribed notification received.

Parameters

Name Type
event "notification"
listener (data: Notification) => void

Returns

NotificationListener

Overrides

EventEmitter.on

Defined in

src/NotificationListener.ts:326