Class: DataConnector

DataConnector(url)

The DataConnector is the abstract class used to create different connectors.

Constructor

new DataConnector(url)

Parameters:
Name Type Description
url String The full url used to connect to the data stream
Source:

Methods

checkStatus(status)

Check a change of the status and call the corresponding callbacks if necessary
Parameters:
Name Type Description
status Status the currentStatus
Source:

getId() → {String}

The data protocol default id.
Source:
Returns:
Type
String

getUrl() → {String}

The stream url.
Source:
Returns:
Type
String

onChangeStatus(status)

Called when the connection STATUS changes
Parameters:
Name Type Description
status Status the new status
Source:

onConnect()

Called when the protocol has been connected
Source:

onDisconnect()

Called when the protocol has been disconnected
Source:

setReconnectTimeout(timeout)

Sets the reconnection timeout
Parameters:
Name Type Description
timeout Number delay in milliseconds before reconnecting dataSource
Source:

setUrl(url)

Sets the url
Parameters:
Name Type Description
url
Source: