Skip to main content
The Deno 2 Release Candidate is here
Learn more
class NotifierController
import { NotifierController } from "https://deno.land/x/sptaki@1.2.0/controllers/NotifierController.d.ts";

Constructors

new
NotifierController(
notifierHelper: NotifierHelper,
httpServerHelper: HttpServerHelper,
notificationService: NotificationService,
)

Properties

protected
httpServerHelper: HttpServerHelper
protected
notificationService: NotificationService
protected
notifierHelper: NotifierHelper
protected
pollInterval: number
protected
timeout: number

Methods

getChannel(sessionID: string): INotifierChannel

Handle client/notifier/channel/create

getServer(sessionID: string): string
notifyAsync(sessionID: string): Promise<unknown>

Resolve an array of session notifications.

If no notifications are currently queued then intermittently check for new notifications until either one or more appear or when a timeout expires. If no notifications are available after the timeout, use a default message.