Last updated

API / geotoolkit / map / sources / connectors / WebSocket / WebSocket

Class: WebSocket

connectors.WebSocket.WebSocket

Source connector that sends requests by creating WebSocket

Hierarchy

Table of contents

Constructors
Methods

Contents

Constructors

new WebSocket()

new WebSocket()

Overrides

AbstractConnector<InstanceType<typeof $window.WebSocket>>.constructor

Methods

abort

abort(key?): WebSocket

Aborts the previous queries sent

Parameters

Name Type Description
Optional keystringkey of the queries to abort (all queries aborted if nothing provided)

Returns

WebSocket

this

Inherited from

AbstractConnector.abort


abortConnection

Protected abortConnection(connection): WebSocket

Aborts the connection provided

Parameters

Name Type Description
connectionWebSocketconnection to abort

Returns

WebSocket

this

Overrides

AbstractConnector.abortConnection


addConnection

Protected addConnection(key, connection): WebSocket

Adds connection to the list

Parameters

Name Type Description
keystringkey of the connection (null if no provided)
connectionWebSocketconnection to add to the list

Returns

WebSocket

this

Inherited from

AbstractConnector.addConnection


clone

clone(): AbstractConnector<WebSocket>

All subclasses should override copyConstructor or provide custom implementation for this method

Returns

AbstractConnector<WebSocket>

clone

Inherited from

AbstractConnector.clone


getClassName

getClassName(): string

Returns

string

Inherited from

AbstractConnector.getClassName


getConnection

Protected getConnection(key): WebSocket

Returns connection by the key

Parameters

Name Type Description
keystringkey for the connection

Returns

WebSocket

connection

Inherited from

AbstractConnector.getConnection


isLoading

isLoading(): boolean

Checks if some connections are still loading

Returns

boolean

Inherited from

AbstractConnector.isLoading


removeConnection

Protected removeConnection(key, connection): WebSocket

Removes connection from the list

Parameters

Name Type Description
keystringkey of the connection (null if no provided)
connectionWebSocketconnection to remvoe from the list

Returns

WebSocket

this

Inherited from

AbstractConnector.removeConnection


send

send(url, options, callback): void

Sends a request using the query provided

Parameters

Name Type Description
urlstringthe url requested
optionsSendOptionsextra options for the request (null if no needed)
callbackSendCallbackthe result handler that's called when response is received

Returns

void

Overrides

AbstractConnector.send


getClassName

Static getClassName(): string

Returns

string

Inherited from

AbstractConnector.getClassName