The JavaScript library that implements the CometVisu protocol.
- Since:
-
- 0.5.3 (initial contribution) 0.10.0 (major refactoring)
- Source:
Requires
- module:dependencies/jquery
Methods
-
<inner> beforeSend(xhr)
-
manipulates the header of the current ajax query before it is
been send to the serverParameters:
Name Type Description xhr- Source:
-
<inner> buildRequest(addresses)
-
Build the URL part that contains the addresses and filters
Parameters:
Name Type Description addresses- Source:
Returns:
- Type
- String
-
<inner> handleError(xhr, str, excptObj)
-
This function gets called on an error FIXME: this should be a
prototype, so that the application developer can override itParameters:
Name Type Description xhrstrexcptObj- Source:
-
<inner> handleRead(json)
-
This function gets called once the communication is established
and session information is availableParameters:
Name Type Description json- Source:
-
<inner> handleSession(json, connect)
-
This function gets called once the communication is established
and session information is available.Parameters:
Name Type Description jsonconnect(boolean) wether to start the connection or not
- Source:
-
<inner> handleSession(connect)
-
This function gets called once the communication is established
and session information is availableParameters:
Name Type Description connect(boolean) wether to start the connection or not
- Source:
-
<inner> login(loginOnly, callback, context)
-
This function starts the communication by a login and then runs the
ongoing communication taskParameters:
Name Type Description loginOnly(boolean) if true only login and backend configuration, no subscription to addresses (default: false)
callback(Function) cakk this function when login is done
context(Object) context for the callback (this)
- Source:
-
<inner> readResendHeaderValues()
-
read the header values of a response and stores them to the
resendHeaders array- Source:
-
<inner> readResendHeaderValues()
-
read the header values of a response and stores them to the resendHeaders array
- Source:
-
<inner> restart()
-
Abort the read request properly
- Source:
-
<inner> restart(doFullReload)
-
Restart the read request, e.g. when the watchdog kicks in
Parameters:
Name Type Description doFullReloadbool reload all data and not only restart connection
- Source:
-
<inner> restart()
-
Abort the read request properly
- Source:
-
<inner> restart()
-
Restart the read request, e.g. when the watchdog kicks in
- Source:
-
<inner> stop()
-
This function stops an ongoing connection
- Source:
-
<inner> subscribe(addresses, filters)
-
Subscribe to the addresses in the parameter. The second parameter
(filter) is optionalParameters:
Name Type Description addressesfilters- Source:
-
<inner> write(address, value)
-
This function sends a value
Parameters:
Name Type Description addressvalue- Source: