API / geotoolkit / map / sources / connectors / WebSocket / WebSocket
connectors.WebSocket.WebSocket
Source connector that sends requests by creating WebSocket
AbstractConnector<InstanceType<typeof$window.WebSocket>>↳
WebSocket
Constructors
Methods
Constructors
• new WebSocket()
AbstractConnector<InstanceType<typeof $window.WebSocket&gt;&gt;.constructor
Methods
▸ abort(key?): WebSocket
Aborts the previous queries sent
| Name | Type | Description |
|---|---|---|
Optional key | string | key of the queries to abort (all queries aborted if nothing provided) |
this
▸ Protected abortConnection(connection): WebSocket
Aborts the connection provided
| Name | Type | Description |
|---|---|---|
connection | WebSocket | connection to abort |
this
AbstractConnector.abortConnection
▸ Protected addConnection(key, connection): WebSocket
Adds connection to the list
| Name | Type | Description |
|---|---|---|
key | string | key of the connection (null if no provided) |
connection | WebSocket | connection to add to the list |
this
AbstractConnector.addConnection
▸ clone(): AbstractConnector<WebSocket>
All subclasses should override copyConstructor or provide custom implementation for this method
AbstractConnector<WebSocket>
clone
▸ getClassName(): string
string
AbstractConnector.getClassName
▸ Protected getConnection(key): WebSocket
Returns connection by the key
| Name | Type | Description |
|---|---|---|
key | string | key for the connection |
WebSocket
connection
AbstractConnector.getConnection
▸ isLoading(): boolean
Checks if some connections are still loading
boolean
▸ Protected removeConnection(key, connection): WebSocket
Removes connection from the list
| Name | Type | Description |
|---|---|---|
key | string | key of the connection (null if no provided) |
connection | WebSocket | connection to remvoe from the list |
this
AbstractConnector.removeConnection
▸ send(url, options, callback): void
Sends a request using the query provided
| Name | Type | Description |
|---|---|---|
url | string | the url requested |
options | SendOptions | extra options for the request (null if no needed) |
callback | SendCallback | the result handler that's called when response is received |
void
▸ Static getClassName(): string
string