Last updated

API / geotoolkit / map / sources / connectors / AbstractConnector / AbstractConnector

Class: AbstractConnector<T>

connectors.AbstractConnector.AbstractConnector

Abstract source connector that is able to send url requests and receive data responses

Type parameters

NameType
Tany

Hierarchy

Table of contents

Constructors
Methods

Contents

Constructors

new AbstractConnector&lt;T&amp;gt;()

new AbstractConnector<T>()

Type parameters

NameType
Tany
Methods

abort

abort(key?): AbstractConnector<T>

Aborts the previous queries sent

Parameters

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

Returns

AbstractConnector<T>

this


abortConnection

Protected abortConnection(connection): AbstractConnector<T>

Aborts the connection provided

Parameters

Name Type Description
connectionTconnection to abort

Returns

AbstractConnector<T>

this


addConnection

Protected addConnection(key, connection): AbstractConnector<T>

Adds connection to the list

Parameters

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

Returns

AbstractConnector<T>

this


clone

clone(): AbstractConnector<T>

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

Returns

AbstractConnector<T>

clone


getClassName

getClassName(): string

Returns

string


getConnection

Protected getConnection(key): T

Returns connection by the key

Parameters

Name Type Description
keystringkey for the connection

Returns

T

connection


isLoading

isLoading(): boolean

Checks if some connections are still loading

Returns

boolean


removeConnection

Protected removeConnection(key, connection): AbstractConnector<T>

Removes connection from the list

Parameters

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

Returns

AbstractConnector<T>

this


send

Abstract 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


getClassName

Static getClassName(): string

Returns

string