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
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>

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

Returns

AbstractConnector<any>

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


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

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