Skip to content
Last updated

API / geotoolkit / map / sources / connectors / Stub / Stub

Class: Stub

connectors.Stub.Stub

Source connector that simulates the request sending and receives the predefined object

Hierarchy

Table of contents

Constructors
  • [new Stub(options)](/solutions/geotoolkit/GeoToolkit_JS/apis/classes/geotoolkit.map.sources.connectors.stub.stub.md#new stub(options))
Methods

Contents

Constructors

new Stub(options)

• new Stub(options?)

Parameters

Name Type Description
Optional optionsOptionsoptions

Overrides

AbstractConnector.constructor

Methods

abort

▸ abort(key?): Stub

Aborts the previous queries sent

Parameters

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

Returns

Stub

this

Inherited from

AbstractConnector.abort


abortConnection

▸ Protected abortConnection(connection): Stub

Aborts the connection provided

Parameters

Name Type Description
connectionanyconnection to abort

Returns

Stub

this

Inherited from

AbstractConnector.abortConnection


addConnection

▸ Protected addConnection(key, connection): Stub

Adds connection to the list

Parameters

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

Returns

Stub

this

Inherited from

AbstractConnector.addConnection


clone

▸ clone(): AbstractConnector<any&gt;

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

Returns

AbstractConnector<any&gt;

clone

Inherited from

AbstractConnector.clone


getClassName

▸ getClassName(): string

Returns

string

Inherited from

AbstractConnector.getClassName


getConnection

▸ Protected getConnection(key): any

Returns connection by the key

Parameters

Name Type Description
keystringkey for the connection

Returns

any

connection

Inherited from

AbstractConnector.getConnection


isLoading

▸ isLoading(): boolean

Checks if some connections are still loading

Returns

boolean

Inherited from

AbstractConnector.isLoading


isValidUrl

▸ isValidUrl(): boolean

Check if URL is configured to load layer data

Returns

boolean

Overrides

AbstractConnector.isValidUrl


removeConnection

▸ Protected removeConnection(key, connection): Stub

Removes connection from the list

Parameters

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

Returns

Stub

this

Inherited from

AbstractConnector.removeConnection


send

▸ send(url, options, callback): void

Load layer data based on configuration data is configured then it will load. callback is configured then it will triggered the callback function and load data once Promise is resolved.

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