Class: MqttTopicConnector

MqttTopicConnector(properties)

Defines the MqttTopicConnector to communicate with Shared MqttConnector using broadcast channel

Constructor

new MqttTopicConnector(properties)

Parameters:
Name Type Description
properties -
Source:

Extends

Methods

checkStatus(status)

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

close()

Closes the webSocket.
Source:

disconnect()

Disconnects.
Source:

fullDisconnect(removeInterval)

Fully disconnect the websocket connection by sending a close message to the webWorker.
Parameters:
Name Type Description
removeInterval Boolean force removing the interval
Source:

getId() → {String}

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

getUrl() → {String}

The stream url.
Overrides:
Source:
Returns:
Type
String

onChangeStatus(status)

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

onConnect()

Called when the protocol has been connected
Overrides:
Source:

onDisconnect()

Called when the protocol has been disconnected
Overrides:
Source:

reconnect()

Try to reconnect if the connexion if closed
Source:

setReconnectTimeout(timeout)

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

setUrl(url)

Sets the url
Parameters:
Name Type Description
url
Overrides:
Source:

Events

onMessage

The onMessage method used by the websocket to callback the data
Parameters:
Name Type Description
data the callback data
Source: