This is an Alpha release of the API.

@inrupt/solid-client-notifications / websocketNotification / WebsocketNotification

Class: WebsocketNotification

websocketNotification.WebsocketNotification

Hierarchy

Constructors

constructor

+ new WebsocketNotification(topic: string, options?: BaseNotificationOptions): WebsocketNotification

Parameters:

Name

Type

topic

string

options?

BaseNotificationOptions

Returns: WebsocketNotification

Overrides: LiveNotification

Defined in: src/websocketNotification.ts:26

Properties

emitter

emitter: EventEmitter

Inherited from: LiveNotification.emitter

Defined in: src/liveNotification.ts:31


features

features: FeatureOptions

Inherited from: LiveNotification.features

Defined in: src/notification.ts:62


fetch

fetch: (input: RequestInfo, init?: RequestInit) => Promise<Response>

Type declaration:

▸ (input: RequestInfo, init?: RequestInit): Promise<Response>

Parameters:

Name

Type

input

RequestInfo

init?

RequestInit

Returns: Promise<Response>

Defined in: node_modules/typescript/lib/lib.dom.d.ts:20004

Inherited from: LiveNotification.fetch

Defined in: src/notification.ts:58


gateway

Optional gateway: string

Inherited from: LiveNotification.gateway

Defined in: src/notification.ts:56


host

host: string

Inherited from: LiveNotification.host

Defined in: src/notification.ts:54


protocol

Optional protocol: string

Inherited from: LiveNotification.protocol

Defined in: src/liveNotification.ts:29


protocols

protocols: string[]

Inherited from: LiveNotification.protocols

Defined in: src/notification.ts:60


status

status: statuses= “closed”

Inherited from: LiveNotification.status

Defined in: src/notification.ts:64


topic

topic: string

Inherited from: LiveNotification.topic

Defined in: src/notification.ts:52


webSocket

Optional webSocket: WebSocket

Defined in: src/websocketNotification.ts:26

Methods

connect

connect(providedEndpoint?: string, providedSubprotocol?: string): Promise<void>

Parameters:

Name

Type

providedEndpoint?

string

providedSubprotocol?

string

Returns: Promise<void>

Overrides: LiveNotification

Defined in: src/websocketNotification.ts:33


disconnect

disconnect(): void

Returns: void

Overrides: LiveNotification

Defined in: src/websocketNotification.ts:70


fetchNotificationConnectionInfo

fetchNotificationConnectionInfo(): Promise<NotificationConnectionInfo>

Returns: Promise<NotificationConnectionInfo>

Inherited from: LiveNotification

Defined in: src/notification.ts:179


fetchProtocolNegotiationInfo

fetchProtocolNegotiationInfo(): Promise<NegotiationInfo>

Returns: Promise<NegotiationInfo>

Inherited from: LiveNotification

Defined in: src/notification.ts:146


on

on(eventName: string, eventFn: (arg?: any) => void): void

Parameters:

Name

Type

eventName

string

eventFn

(arg?: any) => void

Returns: void

Inherited from: LiveNotification

Defined in: src/liveNotification.ts:54


setSessionFetch

setSessionFetch(sessionFetch?: (input: RequestInfo, init?: RequestInit) => Promise<Response>): void

Parameters:

Name

Type

sessionFetch

(input: RequestInfo, init?: RequestInit) => Promise<Response>

Returns: void

Inherited from: LiveNotification

Defined in: src/notification.ts:116


getDefaultSessionFetch

StaticgetDefaultSessionFetch(): Promise<undefined | (input: RequestInfo, init?: RequestInit) => Promise<Response>>

Returns: Promise<undefined | (input: RequestInfo, init?: RequestInit) => Promise<Response>>

Inherited from: LiveNotification

Defined in: src/notification.ts:80