Singletons that implement this interface receive callbacks for structural container events.

Hierarchy

  • WebSocketBus

Implements

Constructors

Properties

awareOfContainerLifecycle: true = ...
bus: Bus<Event>
config: Config
connected: boolean = false
logging: Logging
request: Request
shouldLoadSessionOnEvent: boolean = true

If true, the session will be loaded when an event is received and persisted after the event's handlers have executed.

If an event has no handlers, the session will NOT be loaded.

Use disableSessionLoad() to disable.

See

disableSessionLoad

subscriptions: Collection<BusSubscriber<Event>> = ...

List of local subscriptions on this bus.

uuid: string = ...
ws: WebSocket

Methods

  • Protected

    Set up an interval that fires a WebSocketHealthCheckEvent on the request bus. This can be used, e.g., to check if the user is still logged in. You can control the interval by setting the server.socket.healthCheckIntervalSeconds config option. Set the option to 0 to disable the interval.

    Returns Promise<void>